Subversion Repositories SmartDukaan

Rev

Rev 22359 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.user;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UserContextService {

  /**
   * service
   */
  public interface Iface extends in.shop2020.generic.GenericService.Iface {

    public User createAnonymousUser(String jsessionId) throws UserContextException, org.apache.thrift.TException;

    public User getUserById(long userId) throws UserContextException, org.apache.thrift.TException;

    public User getUserByCartId(long cartId) throws UserContextException, org.apache.thrift.TException;

    public User getUserByEmail(String email) throws UserContextException, org.apache.thrift.TException;

    public User getUserByMobileNumber(long mobileNumber) throws UserContextException, org.apache.thrift.TException;

    public User createUser(User user) throws UserContextException, org.apache.thrift.TException;

    public User updateUser(User user) throws UserContextException, org.apache.thrift.TException;

    public User authenticateUser(String email, String password) throws AuthenticationException, org.apache.thrift.TException;

    public boolean userExists(String email) throws UserContextException, org.apache.thrift.TException;

    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, org.apache.thrift.TException;

    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;

    public boolean updateAddress(Address address) throws UserContextException, org.apache.thrift.TException;

    public boolean updateCounter(Counter counter) throws UserContextException, org.apache.thrift.TException;

    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException;

    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, org.apache.thrift.TException;

    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;

    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, org.apache.thrift.TException;

    public boolean forgotPassword(String email, String newPassword) throws UserContextException, org.apache.thrift.TException;

    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, org.apache.thrift.TException;

    public Address getAddressById(long addressId) throws UserContextException, org.apache.thrift.TException;

    public long getDefaultAddressId(long userId) throws UserContextException, org.apache.thrift.TException;

    public String getDefaultPincode(long userId) throws UserContextException, org.apache.thrift.TException;

    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, org.apache.thrift.TException;

    public UserCommunication getUserCommunicationById(long id) throws UserCommunicationException, org.apache.thrift.TException;

    public List<UserCommunication> getUserCommunicationByUser(long userId) throws UserCommunicationException, org.apache.thrift.TException;

    public List<UserCommunication> getAllUserCommunications() throws UserCommunicationException, org.apache.thrift.TException;

    public void removeUserCommunication(long id) throws UserCommunicationException, org.apache.thrift.TException;

    public MasterAffiliate createMasterAffiliate(String name, long addedOn) throws UserAffiliateException, org.apache.thrift.TException;

    public List<MasterAffiliate> getAllMasterAffiliates() throws UserAffiliateException, org.apache.thrift.TException;

    public MasterAffiliate getMasterAffiliateById(long id) throws UserAffiliateException, org.apache.thrift.TException;

    public MasterAffiliate getMasterAffiliateByName(String name) throws UserAffiliateException, org.apache.thrift.TException;

    public Affiliate createAffiliate(String name, String url, long masterAffiliateId, long addedOn) throws UserAffiliateException, org.apache.thrift.TException;

    public Affiliate getAffiliateById(long id) throws UserAffiliateException, org.apache.thrift.TException;

    public Affiliate getAffiliateByName(String name) throws UserAffiliateException, org.apache.thrift.TException;

    public Tracker getTrackerById(long id) throws UserAffiliateException, org.apache.thrift.TException;

    public List<Affiliate> getAffiliatesByMasterAffiliate(long id) throws UserAffiliateException, org.apache.thrift.TException;

    public long addTrackLog(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn) throws UserAffiliateException, org.apache.thrift.TException;

    public TrackLog getTrackLogById(long id) throws UserAffiliateException, org.apache.thrift.TException;

    public List<TrackLog> getTrackLogsByAffiliate(long affiliateId, long startDate, long endDate) throws UserAffiliateException, org.apache.thrift.TException;

    public List<TrackLog> getTrackLogsByUser(long userId) throws UserAffiliateException, org.apache.thrift.TException;

    public List<TrackLog> getTrackLogs(long userId, String event, String url) throws UserAffiliateException, org.apache.thrift.TException;

    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException;

    public Cart getCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException;

    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, org.apache.thrift.TException;

    public String addItemToCart(long cartId, long itemId, long quantity, long sourceId) throws ShoppingCartException, org.apache.thrift.TException;

    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, org.apache.thrift.TException;

    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, org.apache.thrift.TException;

    public void addStoreToCart(long cartId, long storeId) throws ShoppingCartException, org.apache.thrift.TException;

    public void applyCouponToCart(Cart cart, String couponCode) throws ShoppingCartException, org.apache.thrift.TException;

    public void removeCoupon(long cartId) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Deletes all the discounts associated with the cart
     * 
     * @param cartId
     */
    public void deleteDiscountsFromCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Accepts a list of thrift objects of Discount type and saves them
     * 
     * @param discounts
     */
    public void saveDiscounts(List<Discount> discounts) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
     * 
     * @param cartId
     * @param sessionSource
     * @param sessionStartTime
     * @param firstSource
     * @param firstSourceTime
     * @param userId
     * @param schemeId
     * @param orderSource
     * @param selfPickup
     */
    public long createOrders(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Validates that:
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
     * 2. All of the lines in the cart are active items.
     * 3. The estimate for any of the lines in cart doesn't change.
     * If all three are true, returns empty string; else returns appropriate message.
     * 
     * @param cartId
     * @param sourceId
     */
    public List<String> validateCart(long cartId, long sourceId) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Validates that:
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
     * 2. All of the lines in the cart are active items.
     * 3. The estimate for any of the lines in cart doesn't change.
     * If all three are true, returns empty string; else returns appropriate message.
     * 
     * @param cartId
     * @param sourceId
     * @param dealCoupon
     */
    public List<String> validateCartWithDealerCoupon(long cartId, long sourceId, String dealCoupon) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
     * 
     * @param fromCartId
     * @param toCartId
     */
    public void mergeCart(long fromCartId, long toCartId) throws org.apache.thrift.TException;

    /**
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
     * 
     * @param cartId
     */
    public boolean checkOut(long cartId) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
     * This methods removes the specified quantiry of the specified item from the cart.
     * 
     * @param cartId
     * @param items
     */
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, org.apache.thrift.TException;

    /**
     * Returns number of registered users.
     * If userType = null, then it returns count of all users, including anonymous
     * If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
     * If userType = UserType.USER, then it returns count of non-anonymous users only
     * 
     * @param userType
     */
    public long getUserCount(UserType userType) throws org.apache.thrift.TException;

    /**
     * Returns list of users of type userType who registered between startDate and endDate (both inclusive).
     * If any of startDate or endDate is -1, then that filter is ignored.
     * If userType is null, then returns all the users, irrespective of anonymous flag
     * 
     * 
     * @param userType
     * @param startDate
     * @param endDate
     */
    public List<User> getAllUsers(UserType userType, long startDate, long endDate) throws org.apache.thrift.TException;

    /**
     * Returns list of item ids in myresearch for the user
     * 
     * @param userId
     */
    public List<Long> getMyResearchItems(long userId) throws WidgetException, org.apache.thrift.TException;

    /**
     * add item to my research for a user
     * 
     * @param userId
     * @param itemId
     */
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, org.apache.thrift.TException;

    /**
     * delete item from my research for a user
     * 
     * @param userId
     * @param itemId
     */
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, org.apache.thrift.TException;

    /**
     * Returns list of item ids in browse history for the user. It will return maximum 10 items.
     * 
     * @param userId
     */
    public List<Long> getBrowseHistoryItems(long userId) throws WidgetException, org.apache.thrift.TException;

    /**
     * add item to browse history for a user
     * 
     * @param userId
     * @param itemId
     */
    public void updateBrowseHistory(long userId, long itemId) throws org.apache.thrift.TException;

    /**
     * Returns count of Carts with given coupon applied
     * 
     * @param couponCode
     */
    public long getCartsWithCouponCount(String couponCode) throws org.apache.thrift.TException;

    /**
     * Updates COD trust level of a user
     * 
     * @param userId
     * @param trustLevelDelta
     */
    public void increaseTrustLevel(long userId, double trustLevelDelta) throws org.apache.thrift.TException;

    /**
     * Get trust level of a user
     * 
     * @param userId
     */
    public double getTrustLevel(long userId) throws org.apache.thrift.TException;

    /**
     * Returns true/false depending on wether COD is allowed for a cart or not
     * 
     * @param cartId
     * @param sourceId
     * @param pincode
     */
    public boolean showCODOption(long cartId, long sourceId, String pincode) throws org.apache.thrift.TException;

    /**
     * Get email addresses for users activated within a given date range
     * 
     * @param startDate
     * @param endDate
     */
    public List<String> getUserEmails(long startDate, long endDate) throws org.apache.thrift.TException;

    /**
     * Mark a cart lineitem as insured. Returns true/false.
     * 
     * @param itemId
     * @param cartId
     * @param toInsure
     * @param insurerType
     */
    public boolean insureItem(long itemId, long cartId, boolean toInsure, int insurerType) throws org.apache.thrift.TException;

    /**
     * Cancel insurance for all items in the cart
     * 
     * @param cartId
     */
    public boolean cancelInsurance(long cartId) throws org.apache.thrift.TException;

    /**
     * Stores insurance specific details like date of birth and guardianName
     * 
     * @param addressId
     * @param dob
     * @param guardianName
     */
    public boolean storeInsuranceSpecificDetails(long addressId, String dob, String guardianName) throws org.apache.thrift.TException;

    /**
     * Return true or false based on whether the user has stored any insurance info corresponding to the given addressId
     * 
     * @param addressId
     */
    public boolean isInsuranceDetailPresent(long addressId) throws org.apache.thrift.TException;

    /**
     * Returns list of item ids which added to cart from startDate to endDate
     * 
     * @param startDate
     * @param endDate
     */
    public List<Long> getProductsAddedToCart(long startDate, long endDate) throws org.apache.thrift.TException;

    /**
     * This method is speciically used to avoid overloadaed calls to userClient
     * 
     * @param cartId
     * @param sourceId
     * @param dealerCoupon
     */
    public CartPlus validateCartPlus(long cartId, long sourceId, String dealerCoupon) throws ShoppingCartException, org.apache.thrift.TException;

    public boolean isPrivateDealUser(long userId) throws org.apache.thrift.TException;

    public boolean addPrivateDealUser(long userId) throws org.apache.thrift.TException;

    public boolean changePrivateDealUserStatus(long userId, boolean isActive) throws org.apache.thrift.TException;

    public PrivateDealUser getPrivateDealUser(long userId) throws org.apache.thrift.TException;

    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException;

    public List<Counter> searchCounter(String type1, String searchString) throws org.apache.thrift.TException;

    public Counter getCounterByUserId(long userId) throws org.apache.thrift.TException;

    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException;

    public String getActiveAccessTokenForUser(long userId, String source) throws org.apache.thrift.TException;

    public boolean validateAccessToken(String accessToken) throws org.apache.thrift.TException;

    public boolean addItemsToCart(long cartId, List<ItemQuantity> itemQty, String couponCode) throws org.apache.thrift.TException;

    public String validateCartNew(long cartId, String pinCode, long sourceId) throws org.apache.thrift.TException;

    public boolean isAddressEditableForCounter(long userId) throws org.apache.thrift.TException;

    public Address getBillingAddressForUser(long userId) throws org.apache.thrift.TException;

    public boolean isCreditorAssigned(long userId) throws org.apache.thrift.TException;

    public boolean isTaxInvoiceEnabledUser(long userId) throws org.apache.thrift.TException;

    public boolean taxInvoiceAvailable(long addressId) throws org.apache.thrift.TException;

    public Map<Long,List<Line>> getCartByValue(List<Long> cartIds) throws org.apache.thrift.TException;

    public Map<Long,String> getCounterName(List<Long> userIds) throws org.apache.thrift.TException;

    public boolean setWalletAmountInCart(long cartId, double wallet_amount) throws org.apache.thrift.TException;

  }

  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {

    public void createAnonymousUser(String jsessionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createAnonymousUser_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserById(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserById_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserByCartId(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserByCartId_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserByEmail(String email, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserByEmail_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserByMobileNumber(long mobileNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserByMobileNumber_call> resultHandler) throws org.apache.thrift.TException;

    public void createUser(User user, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createUser_call> resultHandler) throws org.apache.thrift.TException;

    public void updateUser(User user, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateUser_call> resultHandler) throws org.apache.thrift.TException;

    public void authenticateUser(String email, String password, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.authenticateUser_call> resultHandler) throws org.apache.thrift.TException;

    public void userExists(String email, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.userExists_call> resultHandler) throws org.apache.thrift.TException;

    public void addAddressForUser(long userId, Address address, boolean setDefault, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAddressForUser_call> resultHandler) throws org.apache.thrift.TException;

    public void removeAddressForUser(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeAddressForUser_call> resultHandler) throws org.apache.thrift.TException;

    public void updateAddress(Address address, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateAddress_call> resultHandler) throws org.apache.thrift.TException;

    public void updateCounter(Counter counter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateCounter_call> resultHandler) throws org.apache.thrift.TException;

    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException;

    public void setUserAsLoggedOut(long userid, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedOut_call> resultHandler) throws org.apache.thrift.TException;

    public void setDefaultAddress(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setDefaultAddress_call> resultHandler) throws org.apache.thrift.TException;

    public void updatePassword(long userid, String oldPassword, String newPassword, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePassword_call> resultHandler) throws org.apache.thrift.TException;

    public void forgotPassword(String email, String newPassword, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.forgotPassword_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllAddressesForUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAddressesForUser_call> resultHandler) throws org.apache.thrift.TException;

    public void getAddressById(long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAddressById_call> resultHandler) throws org.apache.thrift.TException;

    public void getDefaultAddressId(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDefaultAddressId_call> resultHandler) throws org.apache.thrift.TException;

    public void getDefaultPincode(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDefaultPincode_call> resultHandler) throws org.apache.thrift.TException;

    public void saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.saveUserCommunication_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserCommunicationById(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserCommunicationById_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserCommunicationByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserCommunicationByUser_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllUserCommunications(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllUserCommunications_call> resultHandler) throws org.apache.thrift.TException;

    public void removeUserCommunication(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeUserCommunication_call> resultHandler) throws org.apache.thrift.TException;

    public void createMasterAffiliate(String name, long addedOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createMasterAffiliate_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllMasterAffiliates(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllMasterAffiliates_call> resultHandler) throws org.apache.thrift.TException;

    public void getMasterAffiliateById(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMasterAffiliateById_call> resultHandler) throws org.apache.thrift.TException;

    public void getMasterAffiliateByName(String name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMasterAffiliateByName_call> resultHandler) throws org.apache.thrift.TException;

    public void createAffiliate(String name, String url, long masterAffiliateId, long addedOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createAffiliate_call> resultHandler) throws org.apache.thrift.TException;

    public void getAffiliateById(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAffiliateById_call> resultHandler) throws org.apache.thrift.TException;

    public void getAffiliateByName(String name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAffiliateByName_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrackerById(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackerById_call> resultHandler) throws org.apache.thrift.TException;

    public void getAffiliatesByMasterAffiliate(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAffiliatesByMasterAffiliate_call> resultHandler) throws org.apache.thrift.TException;

    public void addTrackLog(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addTrackLog_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrackLogById(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogById_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrackLogsByAffiliate(long affiliateId, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogsByAffiliate_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrackLogsByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogsByUser_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrackLogs(long userId, String event, String url, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogs_call> resultHandler) throws org.apache.thrift.TException;

    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentCart_call> resultHandler) throws org.apache.thrift.TException;

    public void getCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCart_call> resultHandler) throws org.apache.thrift.TException;

    public void getCartsByTime(long from_time, long to_time, CartStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCartsByTime_call> resultHandler) throws org.apache.thrift.TException;

    public void addItemToCart(long cartId, long itemId, long quantity, long sourceId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItemToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void deleteItemFromCart(long cartId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteItemFromCart_call> resultHandler) throws org.apache.thrift.TException;

    public void addAddressToCart(long cartId, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAddressToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void addStoreToCart(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addStoreToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void applyCouponToCart(Cart cart, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void removeCoupon(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeCoupon_call> resultHandler) throws org.apache.thrift.TException;

    public void deleteDiscountsFromCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteDiscountsFromCart_call> resultHandler) throws org.apache.thrift.TException;

    public void saveDiscounts(List<Discount> discounts, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.saveDiscounts_call> resultHandler) throws org.apache.thrift.TException;

    public void createOrders(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createOrders_call> resultHandler) throws org.apache.thrift.TException;

    public void validateCart(long cartId, long sourceId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateCart_call> resultHandler) throws org.apache.thrift.TException;

    public void validateCartWithDealerCoupon(long cartId, long sourceId, String dealCoupon, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateCartWithDealerCoupon_call> resultHandler) throws org.apache.thrift.TException;

    public void mergeCart(long fromCartId, long toCartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mergeCart_call> resultHandler) throws org.apache.thrift.TException;

    public void checkOut(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.checkOut_call> resultHandler) throws org.apache.thrift.TException;

    public void resetCart(long cartId, Map<Long,Double> items, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.resetCart_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserCount(UserType userType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserCount_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllUsers(UserType userType, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllUsers_call> resultHandler) throws org.apache.thrift.TException;

    public void getMyResearchItems(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMyResearchItems_call> resultHandler) throws org.apache.thrift.TException;

    public void updateMyResearch(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateMyResearch_call> resultHandler) throws org.apache.thrift.TException;

    public void deleteItemFromMyResearch(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteItemFromMyResearch_call> resultHandler) throws org.apache.thrift.TException;

    public void getBrowseHistoryItems(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getBrowseHistoryItems_call> resultHandler) throws org.apache.thrift.TException;

    public void updateBrowseHistory(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateBrowseHistory_call> resultHandler) throws org.apache.thrift.TException;

    public void getCartsWithCouponCount(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCartsWithCouponCount_call> resultHandler) throws org.apache.thrift.TException;

    public void increaseTrustLevel(long userId, double trustLevelDelta, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.increaseTrustLevel_call> resultHandler) throws org.apache.thrift.TException;

    public void getTrustLevel(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrustLevel_call> resultHandler) throws org.apache.thrift.TException;

    public void showCODOption(long cartId, long sourceId, String pincode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.showCODOption_call> resultHandler) throws org.apache.thrift.TException;

    public void getUserEmails(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserEmails_call> resultHandler) throws org.apache.thrift.TException;

    public void insureItem(long itemId, long cartId, boolean toInsure, int insurerType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insureItem_call> resultHandler) throws org.apache.thrift.TException;

    public void cancelInsurance(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.cancelInsurance_call> resultHandler) throws org.apache.thrift.TException;

    public void storeInsuranceSpecificDetails(long addressId, String dob, String guardianName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.storeInsuranceSpecificDetails_call> resultHandler) throws org.apache.thrift.TException;

    public void isInsuranceDetailPresent(long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInsuranceDetailPresent_call> resultHandler) throws org.apache.thrift.TException;

    public void getProductsAddedToCart(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getProductsAddedToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void validateCartPlus(long cartId, long sourceId, String dealerCoupon, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateCartPlus_call> resultHandler) throws org.apache.thrift.TException;

    public void isPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException;

    public void addPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException;

    public void changePrivateDealUserStatus(long userId, boolean isActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePrivateDealUserStatus_call> resultHandler) throws org.apache.thrift.TException;

    public void getPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException;

    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerCounter_call> resultHandler) throws org.apache.thrift.TException;

    public void searchCounter(String type1, String searchString, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.searchCounter_call> resultHandler) throws org.apache.thrift.TException;

    public void getCounterByUserId(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCounterByUserId_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException;

    public void getActiveAccessTokenForUser(long userId, String source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveAccessTokenForUser_call> resultHandler) throws org.apache.thrift.TException;

    public void validateAccessToken(String accessToken, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateAccessToken_call> resultHandler) throws org.apache.thrift.TException;

    public void addItemsToCart(long cartId, List<ItemQuantity> itemQty, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItemsToCart_call> resultHandler) throws org.apache.thrift.TException;

    public void validateCartNew(long cartId, String pinCode, long sourceId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateCartNew_call> resultHandler) throws org.apache.thrift.TException;

    public void isAddressEditableForCounter(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isAddressEditableForCounter_call> resultHandler) throws org.apache.thrift.TException;

    public void getBillingAddressForUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getBillingAddressForUser_call> resultHandler) throws org.apache.thrift.TException;

    public void isCreditorAssigned(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isCreditorAssigned_call> resultHandler) throws org.apache.thrift.TException;

    public void isTaxInvoiceEnabledUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isTaxInvoiceEnabledUser_call> resultHandler) throws org.apache.thrift.TException;

    public void taxInvoiceAvailable(long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.taxInvoiceAvailable_call> resultHandler) throws org.apache.thrift.TException;

    public void getCartByValue(List<Long> cartIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCartByValue_call> resultHandler) throws org.apache.thrift.TException;

    public void getCounterName(List<Long> userIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCounterName_call> resultHandler) throws org.apache.thrift.TException;

    public void setWalletAmountInCart(long cartId, double wallet_amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setWalletAmountInCart_call> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public User createAnonymousUser(String jsessionId) throws UserContextException, org.apache.thrift.TException
    {
      send_createAnonymousUser(jsessionId);
      return recv_createAnonymousUser();
    }

    public void send_createAnonymousUser(String jsessionId) throws org.apache.thrift.TException
    {
      createAnonymousUser_args args = new createAnonymousUser_args();
      args.setJsessionId(jsessionId);
      sendBase("createAnonymousUser", args);
    }

    public User recv_createAnonymousUser() throws UserContextException, org.apache.thrift.TException
    {
      createAnonymousUser_result result = new createAnonymousUser_result();
      receiveBase(result, "createAnonymousUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
    }

    public User getUserById(long userId) throws UserContextException, org.apache.thrift.TException
    {
      send_getUserById(userId);
      return recv_getUserById();
    }

    public void send_getUserById(long userId) throws org.apache.thrift.TException
    {
      getUserById_args args = new getUserById_args();
      args.setUserId(userId);
      sendBase("getUserById", args);
    }

    public User recv_getUserById() throws UserContextException, org.apache.thrift.TException
    {
      getUserById_result result = new getUserById_result();
      receiveBase(result, "getUserById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
    }

    public User getUserByCartId(long cartId) throws UserContextException, org.apache.thrift.TException
    {
      send_getUserByCartId(cartId);
      return recv_getUserByCartId();
    }

    public void send_getUserByCartId(long cartId) throws org.apache.thrift.TException
    {
      getUserByCartId_args args = new getUserByCartId_args();
      args.setCartId(cartId);
      sendBase("getUserByCartId", args);
    }

    public User recv_getUserByCartId() throws UserContextException, org.apache.thrift.TException
    {
      getUserByCartId_result result = new getUserByCartId_result();
      receiveBase(result, "getUserByCartId");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserByCartId failed: unknown result");
    }

    public User getUserByEmail(String email) throws UserContextException, org.apache.thrift.TException
    {
      send_getUserByEmail(email);
      return recv_getUserByEmail();
    }

    public void send_getUserByEmail(String email) throws org.apache.thrift.TException
    {
      getUserByEmail_args args = new getUserByEmail_args();
      args.setEmail(email);
      sendBase("getUserByEmail", args);
    }

    public User recv_getUserByEmail() throws UserContextException, org.apache.thrift.TException
    {
      getUserByEmail_result result = new getUserByEmail_result();
      receiveBase(result, "getUserByEmail");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
    }

    public User getUserByMobileNumber(long mobileNumber) throws UserContextException, org.apache.thrift.TException
    {
      send_getUserByMobileNumber(mobileNumber);
      return recv_getUserByMobileNumber();
    }

    public void send_getUserByMobileNumber(long mobileNumber) throws org.apache.thrift.TException
    {
      getUserByMobileNumber_args args = new getUserByMobileNumber_args();
      args.setMobileNumber(mobileNumber);
      sendBase("getUserByMobileNumber", args);
    }

    public User recv_getUserByMobileNumber() throws UserContextException, org.apache.thrift.TException
    {
      getUserByMobileNumber_result result = new getUserByMobileNumber_result();
      receiveBase(result, "getUserByMobileNumber");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserByMobileNumber failed: unknown result");
    }

    public User createUser(User user) throws UserContextException, org.apache.thrift.TException
    {
      send_createUser(user);
      return recv_createUser();
    }

    public void send_createUser(User user) throws org.apache.thrift.TException
    {
      createUser_args args = new createUser_args();
      args.setUser(user);
      sendBase("createUser", args);
    }

    public User recv_createUser() throws UserContextException, org.apache.thrift.TException
    {
      createUser_result result = new createUser_result();
      receiveBase(result, "createUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
    }

    public User updateUser(User user) throws UserContextException, org.apache.thrift.TException
    {
      send_updateUser(user);
      return recv_updateUser();
    }

    public void send_updateUser(User user) throws org.apache.thrift.TException
    {
      updateUser_args args = new updateUser_args();
      args.setUser(user);
      sendBase("updateUser", args);
    }

    public User recv_updateUser() throws UserContextException, org.apache.thrift.TException
    {
      updateUser_result result = new updateUser_result();
      receiveBase(result, "updateUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucex != null) {
        throw result.ucex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
    }

    public User authenticateUser(String email, String password) throws AuthenticationException, org.apache.thrift.TException
    {
      send_authenticateUser(email, password);
      return recv_authenticateUser();
    }

    public void send_authenticateUser(String email, String password) throws org.apache.thrift.TException
    {
      authenticateUser_args args = new authenticateUser_args();
      args.setEmail(email);
      args.setPassword(password);
      sendBase("authenticateUser", args);
    }

    public User recv_authenticateUser() throws AuthenticationException, org.apache.thrift.TException
    {
      authenticateUser_result result = new authenticateUser_result();
      receiveBase(result, "authenticateUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.auex != null) {
        throw result.auex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
    }

    public boolean userExists(String email) throws UserContextException, org.apache.thrift.TException
    {
      send_userExists(email);
      return recv_userExists();
    }

    public void send_userExists(String email) throws org.apache.thrift.TException
    {
      userExists_args args = new userExists_args();
      args.setEmail(email);
      sendBase("userExists", args);
    }

    public boolean recv_userExists() throws UserContextException, org.apache.thrift.TException
    {
      userExists_result result = new userExists_result();
      receiveBase(result, "userExists");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
    }

    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, org.apache.thrift.TException
    {
      send_addAddressForUser(userId, address, setDefault);
      return recv_addAddressForUser();
    }

    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws org.apache.thrift.TException
    {
      addAddressForUser_args args = new addAddressForUser_args();
      args.setUserId(userId);
      args.setAddress(address);
      args.setSetDefault(setDefault);
      sendBase("addAddressForUser", args);
    }

    public long recv_addAddressForUser() throws UserContextException, org.apache.thrift.TException
    {
      addAddressForUser_result result = new addAddressForUser_result();
      receiveBase(result, "addAddressForUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
    }

    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, org.apache.thrift.TException
    {
      send_removeAddressForUser(userid, addressId);
      return recv_removeAddressForUser();
    }

    public void send_removeAddressForUser(long userid, long addressId) throws org.apache.thrift.TException
    {
      removeAddressForUser_args args = new removeAddressForUser_args();
      args.setUserid(userid);
      args.setAddressId(addressId);
      sendBase("removeAddressForUser", args);
    }

    public boolean recv_removeAddressForUser() throws UserContextException, org.apache.thrift.TException
    {
      removeAddressForUser_result result = new removeAddressForUser_result();
      receiveBase(result, "removeAddressForUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
    }

    public boolean updateAddress(Address address) throws UserContextException, org.apache.thrift.TException
    {
      send_updateAddress(address);
      return recv_updateAddress();
    }

    public void send_updateAddress(Address address) throws org.apache.thrift.TException
    {
      updateAddress_args args = new updateAddress_args();
      args.setAddress(address);
      sendBase("updateAddress", args);
    }

    public boolean recv_updateAddress() throws UserContextException, org.apache.thrift.TException
    {
      updateAddress_result result = new updateAddress_result();
      receiveBase(result, "updateAddress");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateAddress failed: unknown result");
    }

    public boolean updateCounter(Counter counter) throws UserContextException, org.apache.thrift.TException
    {
      send_updateCounter(counter);
      return recv_updateCounter();
    }

    public void send_updateCounter(Counter counter) throws org.apache.thrift.TException
    {
      updateCounter_args args = new updateCounter_args();
      args.setCounter(counter);
      sendBase("updateCounter", args);
    }

    public boolean recv_updateCounter() throws UserContextException, org.apache.thrift.TException
    {
      updateCounter_result result = new updateCounter_result();
      receiveBase(result, "updateCounter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateCounter failed: unknown result");
    }

    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException
    {
      send_setUserAsLoggedIn(userId, timestamp);
      return recv_setUserAsLoggedIn();
    }

    public void send_setUserAsLoggedIn(long userId, long timestamp) throws org.apache.thrift.TException
    {
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
      args.setUserId(userId);
      args.setTimestamp(timestamp);
      sendBase("setUserAsLoggedIn", args);
    }

    public boolean recv_setUserAsLoggedIn() throws UserContextException, org.apache.thrift.TException
    {
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
      receiveBase(result, "setUserAsLoggedIn");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
    }

    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, org.apache.thrift.TException
    {
      send_setUserAsLoggedOut(userid, timestamp);
      return recv_setUserAsLoggedOut();
    }

    public void send_setUserAsLoggedOut(long userid, long timestamp) throws org.apache.thrift.TException
    {
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
      args.setUserid(userid);
      args.setTimestamp(timestamp);
      sendBase("setUserAsLoggedOut", args);
    }

    public boolean recv_setUserAsLoggedOut() throws UserContextException, org.apache.thrift.TException
    {
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
      receiveBase(result, "setUserAsLoggedOut");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
    }

    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, org.apache.thrift.TException
    {
      send_setDefaultAddress(userid, addressId);
      return recv_setDefaultAddress();
    }

    public void send_setDefaultAddress(long userid, long addressId) throws org.apache.thrift.TException
    {
      setDefaultAddress_args args = new setDefaultAddress_args();
      args.setUserid(userid);
      args.setAddressId(addressId);
      sendBase("setDefaultAddress", args);
    }

    public boolean recv_setDefaultAddress() throws UserContextException, org.apache.thrift.TException
    {
      setDefaultAddress_result result = new setDefaultAddress_result();
      receiveBase(result, "setDefaultAddress");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
    }

    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, org.apache.thrift.TException
    {
      send_updatePassword(userid, oldPassword, newPassword);
      return recv_updatePassword();
    }

    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws org.apache.thrift.TException
    {
      updatePassword_args args = new updatePassword_args();
      args.setUserid(userid);
      args.setOldPassword(oldPassword);
      args.setNewPassword(newPassword);
      sendBase("updatePassword", args);
    }

    public boolean recv_updatePassword() throws UserContextException, org.apache.thrift.TException
    {
      updatePassword_result result = new updatePassword_result();
      receiveBase(result, "updatePassword");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
    }

    public boolean forgotPassword(String email, String newPassword) throws UserContextException, org.apache.thrift.TException
    {
      send_forgotPassword(email, newPassword);
      return recv_forgotPassword();
    }

    public void send_forgotPassword(String email, String newPassword) throws org.apache.thrift.TException
    {
      forgotPassword_args args = new forgotPassword_args();
      args.setEmail(email);
      args.setNewPassword(newPassword);
      sendBase("forgotPassword", args);
    }

    public boolean recv_forgotPassword() throws UserContextException, org.apache.thrift.TException
    {
      forgotPassword_result result = new forgotPassword_result();
      receiveBase(result, "forgotPassword");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
    }

    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, org.apache.thrift.TException
    {
      send_getAllAddressesForUser(userId);
      return recv_getAllAddressesForUser();
    }

    public void send_getAllAddressesForUser(long userId) throws org.apache.thrift.TException
    {
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
      args.setUserId(userId);
      sendBase("getAllAddressesForUser", args);
    }

    public List<Address> recv_getAllAddressesForUser() throws UserContextException, org.apache.thrift.TException
    {
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
      receiveBase(result, "getAllAddressesForUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
    }

    public Address getAddressById(long addressId) throws UserContextException, org.apache.thrift.TException
    {
      send_getAddressById(addressId);
      return recv_getAddressById();
    }

    public void send_getAddressById(long addressId) throws org.apache.thrift.TException
    {
      getAddressById_args args = new getAddressById_args();
      args.setAddressId(addressId);
      sendBase("getAddressById", args);
    }

    public Address recv_getAddressById() throws UserContextException, org.apache.thrift.TException
    {
      getAddressById_result result = new getAddressById_result();
      receiveBase(result, "getAddressById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAddressById failed: unknown result");
    }

    public long getDefaultAddressId(long userId) throws UserContextException, org.apache.thrift.TException
    {
      send_getDefaultAddressId(userId);
      return recv_getDefaultAddressId();
    }

    public void send_getDefaultAddressId(long userId) throws org.apache.thrift.TException
    {
      getDefaultAddressId_args args = new getDefaultAddressId_args();
      args.setUserId(userId);
      sendBase("getDefaultAddressId", args);
    }

    public long recv_getDefaultAddressId() throws UserContextException, org.apache.thrift.TException
    {
      getDefaultAddressId_result result = new getDefaultAddressId_result();
      receiveBase(result, "getDefaultAddressId");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
    }

    public String getDefaultPincode(long userId) throws UserContextException, org.apache.thrift.TException
    {
      send_getDefaultPincode(userId);
      return recv_getDefaultPincode();
    }

    public void send_getDefaultPincode(long userId) throws org.apache.thrift.TException
    {
      getDefaultPincode_args args = new getDefaultPincode_args();
      args.setUserId(userId);
      sendBase("getDefaultPincode", args);
    }

    public String recv_getDefaultPincode() throws UserContextException, org.apache.thrift.TException
    {
      getDefaultPincode_result result = new getDefaultPincode_result();
      receiveBase(result, "getDefaultPincode");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
    }

    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, org.apache.thrift.TException
    {
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
      return recv_saveUserCommunication();
    }

    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws org.apache.thrift.TException
    {
      saveUserCommunication_args args = new saveUserCommunication_args();
      args.setUserId(userId);
      args.setReplyTo(replyTo);
      args.setCommunicationType(communicationType);
      args.setOrderId(orderId);
      args.setAirwaybillNo(airwaybillNo);
      args.setProductName(productName);
      args.setSubject(subject);
      args.setMessage(message);
      sendBase("saveUserCommunication", args);
    }

    public boolean recv_saveUserCommunication() throws UserCommunicationException, org.apache.thrift.TException
    {
      saveUserCommunication_result result = new saveUserCommunication_result();
      receiveBase(result, "saveUserCommunication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
    }

    public UserCommunication getUserCommunicationById(long id) throws UserCommunicationException, org.apache.thrift.TException
    {
      send_getUserCommunicationById(id);
      return recv_getUserCommunicationById();
    }

    public void send_getUserCommunicationById(long id) throws org.apache.thrift.TException
    {
      getUserCommunicationById_args args = new getUserCommunicationById_args();
      args.setId(id);
      sendBase("getUserCommunicationById", args);
    }

    public UserCommunication recv_getUserCommunicationById() throws UserCommunicationException, org.apache.thrift.TException
    {
      getUserCommunicationById_result result = new getUserCommunicationById_result();
      receiveBase(result, "getUserCommunicationById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserCommunicationById failed: unknown result");
    }

    public List<UserCommunication> getUserCommunicationByUser(long userId) throws UserCommunicationException, org.apache.thrift.TException
    {
      send_getUserCommunicationByUser(userId);
      return recv_getUserCommunicationByUser();
    }

    public void send_getUserCommunicationByUser(long userId) throws org.apache.thrift.TException
    {
      getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
      args.setUserId(userId);
      sendBase("getUserCommunicationByUser", args);
    }

    public List<UserCommunication> recv_getUserCommunicationByUser() throws UserCommunicationException, org.apache.thrift.TException
    {
      getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
      receiveBase(result, "getUserCommunicationByUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserCommunicationByUser failed: unknown result");
    }

    public List<UserCommunication> getAllUserCommunications() throws UserCommunicationException, org.apache.thrift.TException
    {
      send_getAllUserCommunications();
      return recv_getAllUserCommunications();
    }

    public void send_getAllUserCommunications() throws org.apache.thrift.TException
    {
      getAllUserCommunications_args args = new getAllUserCommunications_args();
      sendBase("getAllUserCommunications", args);
    }

    public List<UserCommunication> recv_getAllUserCommunications() throws UserCommunicationException, org.apache.thrift.TException
    {
      getAllUserCommunications_result result = new getAllUserCommunications_result();
      receiveBase(result, "getAllUserCommunications");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ucx != null) {
        throw result.ucx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserCommunications failed: unknown result");
    }

    public void removeUserCommunication(long id) throws UserCommunicationException, org.apache.thrift.TException
    {
      send_removeUserCommunication(id);
      recv_removeUserCommunication();
    }

    public void send_removeUserCommunication(long id) throws org.apache.thrift.TException
    {
      removeUserCommunication_args args = new removeUserCommunication_args();
      args.setId(id);
      sendBase("removeUserCommunication", args);
    }

    public void recv_removeUserCommunication() throws UserCommunicationException, org.apache.thrift.TException
    {
      removeUserCommunication_result result = new removeUserCommunication_result();
      receiveBase(result, "removeUserCommunication");
      if (result.ucx != null) {
        throw result.ucx;
      }
      return;
    }

    public MasterAffiliate createMasterAffiliate(String name, long addedOn) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_createMasterAffiliate(name, addedOn);
      return recv_createMasterAffiliate();
    }

    public void send_createMasterAffiliate(String name, long addedOn) throws org.apache.thrift.TException
    {
      createMasterAffiliate_args args = new createMasterAffiliate_args();
      args.setName(name);
      args.setAddedOn(addedOn);
      sendBase("createMasterAffiliate", args);
    }

    public MasterAffiliate recv_createMasterAffiliate() throws UserAffiliateException, org.apache.thrift.TException
    {
      createMasterAffiliate_result result = new createMasterAffiliate_result();
      receiveBase(result, "createMasterAffiliate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createMasterAffiliate failed: unknown result");
    }

    public List<MasterAffiliate> getAllMasterAffiliates() throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getAllMasterAffiliates();
      return recv_getAllMasterAffiliates();
    }

    public void send_getAllMasterAffiliates() throws org.apache.thrift.TException
    {
      getAllMasterAffiliates_args args = new getAllMasterAffiliates_args();
      sendBase("getAllMasterAffiliates", args);
    }

    public List<MasterAffiliate> recv_getAllMasterAffiliates() throws UserAffiliateException, org.apache.thrift.TException
    {
      getAllMasterAffiliates_result result = new getAllMasterAffiliates_result();
      receiveBase(result, "getAllMasterAffiliates");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllMasterAffiliates failed: unknown result");
    }

    public MasterAffiliate getMasterAffiliateById(long id) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getMasterAffiliateById(id);
      return recv_getMasterAffiliateById();
    }

    public void send_getMasterAffiliateById(long id) throws org.apache.thrift.TException
    {
      getMasterAffiliateById_args args = new getMasterAffiliateById_args();
      args.setId(id);
      sendBase("getMasterAffiliateById", args);
    }

    public MasterAffiliate recv_getMasterAffiliateById() throws UserAffiliateException, org.apache.thrift.TException
    {
      getMasterAffiliateById_result result = new getMasterAffiliateById_result();
      receiveBase(result, "getMasterAffiliateById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMasterAffiliateById failed: unknown result");
    }

    public MasterAffiliate getMasterAffiliateByName(String name) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getMasterAffiliateByName(name);
      return recv_getMasterAffiliateByName();
    }

    public void send_getMasterAffiliateByName(String name) throws org.apache.thrift.TException
    {
      getMasterAffiliateByName_args args = new getMasterAffiliateByName_args();
      args.setName(name);
      sendBase("getMasterAffiliateByName", args);
    }

    public MasterAffiliate recv_getMasterAffiliateByName() throws UserAffiliateException, org.apache.thrift.TException
    {
      getMasterAffiliateByName_result result = new getMasterAffiliateByName_result();
      receiveBase(result, "getMasterAffiliateByName");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMasterAffiliateByName failed: unknown result");
    }

    public Affiliate createAffiliate(String name, String url, long masterAffiliateId, long addedOn) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_createAffiliate(name, url, masterAffiliateId, addedOn);
      return recv_createAffiliate();
    }

    public void send_createAffiliate(String name, String url, long masterAffiliateId, long addedOn) throws org.apache.thrift.TException
    {
      createAffiliate_args args = new createAffiliate_args();
      args.setName(name);
      args.setUrl(url);
      args.setMasterAffiliateId(masterAffiliateId);
      args.setAddedOn(addedOn);
      sendBase("createAffiliate", args);
    }

    public Affiliate recv_createAffiliate() throws UserAffiliateException, org.apache.thrift.TException
    {
      createAffiliate_result result = new createAffiliate_result();
      receiveBase(result, "createAffiliate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createAffiliate failed: unknown result");
    }

    public Affiliate getAffiliateById(long id) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getAffiliateById(id);
      return recv_getAffiliateById();
    }

    public void send_getAffiliateById(long id) throws org.apache.thrift.TException
    {
      getAffiliateById_args args = new getAffiliateById_args();
      args.setId(id);
      sendBase("getAffiliateById", args);
    }

    public Affiliate recv_getAffiliateById() throws UserAffiliateException, org.apache.thrift.TException
    {
      getAffiliateById_result result = new getAffiliateById_result();
      receiveBase(result, "getAffiliateById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAffiliateById failed: unknown result");
    }

    public Affiliate getAffiliateByName(String name) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getAffiliateByName(name);
      return recv_getAffiliateByName();
    }

    public void send_getAffiliateByName(String name) throws org.apache.thrift.TException
    {
      getAffiliateByName_args args = new getAffiliateByName_args();
      args.setName(name);
      sendBase("getAffiliateByName", args);
    }

    public Affiliate recv_getAffiliateByName() throws UserAffiliateException, org.apache.thrift.TException
    {
      getAffiliateByName_result result = new getAffiliateByName_result();
      receiveBase(result, "getAffiliateByName");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAffiliateByName failed: unknown result");
    }

    public Tracker getTrackerById(long id) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getTrackerById(id);
      return recv_getTrackerById();
    }

    public void send_getTrackerById(long id) throws org.apache.thrift.TException
    {
      getTrackerById_args args = new getTrackerById_args();
      args.setId(id);
      sendBase("getTrackerById", args);
    }

    public Tracker recv_getTrackerById() throws UserAffiliateException, org.apache.thrift.TException
    {
      getTrackerById_result result = new getTrackerById_result();
      receiveBase(result, "getTrackerById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackerById failed: unknown result");
    }

    public List<Affiliate> getAffiliatesByMasterAffiliate(long id) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getAffiliatesByMasterAffiliate(id);
      return recv_getAffiliatesByMasterAffiliate();
    }

    public void send_getAffiliatesByMasterAffiliate(long id) throws org.apache.thrift.TException
    {
      getAffiliatesByMasterAffiliate_args args = new getAffiliatesByMasterAffiliate_args();
      args.setId(id);
      sendBase("getAffiliatesByMasterAffiliate", args);
    }

    public List<Affiliate> recv_getAffiliatesByMasterAffiliate() throws UserAffiliateException, org.apache.thrift.TException
    {
      getAffiliatesByMasterAffiliate_result result = new getAffiliatesByMasterAffiliate_result();
      receiveBase(result, "getAffiliatesByMasterAffiliate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAffiliatesByMasterAffiliate failed: unknown result");
    }

    public long addTrackLog(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_addTrackLog(affiliateId, userId, event, url, data, addedOn);
      return recv_addTrackLog();
    }

    public void send_addTrackLog(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn) throws org.apache.thrift.TException
    {
      addTrackLog_args args = new addTrackLog_args();
      args.setAffiliateId(affiliateId);
      args.setUserId(userId);
      args.setEvent(event);
      args.setUrl(url);
      args.setData(data);
      args.setAddedOn(addedOn);
      sendBase("addTrackLog", args);
    }

    public long recv_addTrackLog() throws UserAffiliateException, org.apache.thrift.TException
    {
      addTrackLog_result result = new addTrackLog_result();
      receiveBase(result, "addTrackLog");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addTrackLog failed: unknown result");
    }

    public TrackLog getTrackLogById(long id) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getTrackLogById(id);
      return recv_getTrackLogById();
    }

    public void send_getTrackLogById(long id) throws org.apache.thrift.TException
    {
      getTrackLogById_args args = new getTrackLogById_args();
      args.setId(id);
      sendBase("getTrackLogById", args);
    }

    public TrackLog recv_getTrackLogById() throws UserAffiliateException, org.apache.thrift.TException
    {
      getTrackLogById_result result = new getTrackLogById_result();
      receiveBase(result, "getTrackLogById");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogById failed: unknown result");
    }

    public List<TrackLog> getTrackLogsByAffiliate(long affiliateId, long startDate, long endDate) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getTrackLogsByAffiliate(affiliateId, startDate, endDate);
      return recv_getTrackLogsByAffiliate();
    }

    public void send_getTrackLogsByAffiliate(long affiliateId, long startDate, long endDate) throws org.apache.thrift.TException
    {
      getTrackLogsByAffiliate_args args = new getTrackLogsByAffiliate_args();
      args.setAffiliateId(affiliateId);
      args.setStartDate(startDate);
      args.setEndDate(endDate);
      sendBase("getTrackLogsByAffiliate", args);
    }

    public List<TrackLog> recv_getTrackLogsByAffiliate() throws UserAffiliateException, org.apache.thrift.TException
    {
      getTrackLogsByAffiliate_result result = new getTrackLogsByAffiliate_result();
      receiveBase(result, "getTrackLogsByAffiliate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogsByAffiliate failed: unknown result");
    }

    public List<TrackLog> getTrackLogsByUser(long userId) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getTrackLogsByUser(userId);
      return recv_getTrackLogsByUser();
    }

    public void send_getTrackLogsByUser(long userId) throws org.apache.thrift.TException
    {
      getTrackLogsByUser_args args = new getTrackLogsByUser_args();
      args.setUserId(userId);
      sendBase("getTrackLogsByUser", args);
    }

    public List<TrackLog> recv_getTrackLogsByUser() throws UserAffiliateException, org.apache.thrift.TException
    {
      getTrackLogsByUser_result result = new getTrackLogsByUser_result();
      receiveBase(result, "getTrackLogsByUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogsByUser failed: unknown result");
    }

    public List<TrackLog> getTrackLogs(long userId, String event, String url) throws UserAffiliateException, org.apache.thrift.TException
    {
      send_getTrackLogs(userId, event, url);
      return recv_getTrackLogs();
    }

    public void send_getTrackLogs(long userId, String event, String url) throws org.apache.thrift.TException
    {
      getTrackLogs_args args = new getTrackLogs_args();
      args.setUserId(userId);
      args.setEvent(event);
      args.setUrl(url);
      sendBase("getTrackLogs", args);
    }

    public List<TrackLog> recv_getTrackLogs() throws UserAffiliateException, org.apache.thrift.TException
    {
      getTrackLogs_result result = new getTrackLogs_result();
      receiveBase(result, "getTrackLogs");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.utx != null) {
        throw result.utx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogs failed: unknown result");
    }

    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_getCurrentCart(userId);
      return recv_getCurrentCart();
    }

    public void send_getCurrentCart(long userId) throws org.apache.thrift.TException
    {
      getCurrentCart_args args = new getCurrentCart_args();
      args.setUserId(userId);
      sendBase("getCurrentCart", args);
    }

    public Cart recv_getCurrentCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      getCurrentCart_result result = new getCurrentCart_result();
      receiveBase(result, "getCurrentCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
    }

    public Cart getCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_getCart(cartId);
      return recv_getCart();
    }

    public void send_getCart(long cartId) throws org.apache.thrift.TException
    {
      getCart_args args = new getCart_args();
      args.setCartId(cartId);
      sendBase("getCart", args);
    }

    public Cart recv_getCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      getCart_result result = new getCart_result();
      receiveBase(result, "getCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
    }

    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_getCartsByTime(from_time, to_time, status);
      return recv_getCartsByTime();
    }

    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws org.apache.thrift.TException
    {
      getCartsByTime_args args = new getCartsByTime_args();
      args.setFrom_time(from_time);
      args.setTo_time(to_time);
      args.setStatus(status);
      sendBase("getCartsByTime", args);
    }

    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, org.apache.thrift.TException
    {
      getCartsByTime_result result = new getCartsByTime_result();
      receiveBase(result, "getCartsByTime");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
    }

    public String addItemToCart(long cartId, long itemId, long quantity, long sourceId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_addItemToCart(cartId, itemId, quantity, sourceId);
      return recv_addItemToCart();
    }

    public void send_addItemToCart(long cartId, long itemId, long quantity, long sourceId) throws org.apache.thrift.TException
    {
      addItemToCart_args args = new addItemToCart_args();
      args.setCartId(cartId);
      args.setItemId(itemId);
      args.setQuantity(quantity);
      args.setSourceId(sourceId);
      sendBase("addItemToCart", args);
    }

    public String recv_addItemToCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      addItemToCart_result result = new addItemToCart_result();
      receiveBase(result, "addItemToCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addItemToCart failed: unknown result");
    }

    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_deleteItemFromCart(cartId, itemId);
      recv_deleteItemFromCart();
    }

    public void send_deleteItemFromCart(long cartId, long itemId) throws org.apache.thrift.TException
    {
      deleteItemFromCart_args args = new deleteItemFromCart_args();
      args.setCartId(cartId);
      args.setItemId(itemId);
      sendBase("deleteItemFromCart", args);
    }

    public void recv_deleteItemFromCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      deleteItemFromCart_result result = new deleteItemFromCart_result();
      receiveBase(result, "deleteItemFromCart");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_addAddressToCart(cartId, addressId);
      recv_addAddressToCart();
    }

    public void send_addAddressToCart(long cartId, long addressId) throws org.apache.thrift.TException
    {
      addAddressToCart_args args = new addAddressToCart_args();
      args.setCartId(cartId);
      args.setAddressId(addressId);
      sendBase("addAddressToCart", args);
    }

    public void recv_addAddressToCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      addAddressToCart_result result = new addAddressToCart_result();
      receiveBase(result, "addAddressToCart");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void addStoreToCart(long cartId, long storeId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_addStoreToCart(cartId, storeId);
      recv_addStoreToCart();
    }

    public void send_addStoreToCart(long cartId, long storeId) throws org.apache.thrift.TException
    {
      addStoreToCart_args args = new addStoreToCart_args();
      args.setCartId(cartId);
      args.setStoreId(storeId);
      sendBase("addStoreToCart", args);
    }

    public void recv_addStoreToCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      addStoreToCart_result result = new addStoreToCart_result();
      receiveBase(result, "addStoreToCart");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void applyCouponToCart(Cart cart, String couponCode) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_applyCouponToCart(cart, couponCode);
      recv_applyCouponToCart();
    }

    public void send_applyCouponToCart(Cart cart, String couponCode) throws org.apache.thrift.TException
    {
      applyCouponToCart_args args = new applyCouponToCart_args();
      args.setCart(cart);
      args.setCouponCode(couponCode);
      sendBase("applyCouponToCart", args);
    }

    public void recv_applyCouponToCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      applyCouponToCart_result result = new applyCouponToCart_result();
      receiveBase(result, "applyCouponToCart");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void removeCoupon(long cartId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_removeCoupon(cartId);
      recv_removeCoupon();
    }

    public void send_removeCoupon(long cartId) throws org.apache.thrift.TException
    {
      removeCoupon_args args = new removeCoupon_args();
      args.setCartId(cartId);
      sendBase("removeCoupon", args);
    }

    public void recv_removeCoupon() throws ShoppingCartException, org.apache.thrift.TException
    {
      removeCoupon_result result = new removeCoupon_result();
      receiveBase(result, "removeCoupon");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void deleteDiscountsFromCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_deleteDiscountsFromCart(cartId);
      recv_deleteDiscountsFromCart();
    }

    public void send_deleteDiscountsFromCart(long cartId) throws org.apache.thrift.TException
    {
      deleteDiscountsFromCart_args args = new deleteDiscountsFromCart_args();
      args.setCartId(cartId);
      sendBase("deleteDiscountsFromCart", args);
    }

    public void recv_deleteDiscountsFromCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      deleteDiscountsFromCart_result result = new deleteDiscountsFromCart_result();
      receiveBase(result, "deleteDiscountsFromCart");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public void saveDiscounts(List<Discount> discounts) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_saveDiscounts(discounts);
      recv_saveDiscounts();
    }

    public void send_saveDiscounts(List<Discount> discounts) throws org.apache.thrift.TException
    {
      saveDiscounts_args args = new saveDiscounts_args();
      args.setDiscounts(discounts);
      sendBase("saveDiscounts", args);
    }

    public void recv_saveDiscounts() throws ShoppingCartException, org.apache.thrift.TException
    {
      saveDiscounts_result result = new saveDiscounts_result();
      receiveBase(result, "saveDiscounts");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public long createOrders(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_createOrders(cartId, sessionSource, sessionStartTime, firstSource, firstSourceTime, userId, schemeId, orderSource, selfPickup);
      return recv_createOrders();
    }

    public void send_createOrders(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup) throws org.apache.thrift.TException
    {
      createOrders_args args = new createOrders_args();
      args.setCartId(cartId);
      args.setSessionSource(sessionSource);
      args.setSessionStartTime(sessionStartTime);
      args.setFirstSource(firstSource);
      args.setFirstSourceTime(firstSourceTime);
      args.setUserId(userId);
      args.setSchemeId(schemeId);
      args.setOrderSource(orderSource);
      args.setSelfPickup(selfPickup);
      sendBase("createOrders", args);
    }

    public long recv_createOrders() throws ShoppingCartException, org.apache.thrift.TException
    {
      createOrders_result result = new createOrders_result();
      receiveBase(result, "createOrders");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
    }

    public List<String> validateCart(long cartId, long sourceId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_validateCart(cartId, sourceId);
      return recv_validateCart();
    }

    public void send_validateCart(long cartId, long sourceId) throws org.apache.thrift.TException
    {
      validateCart_args args = new validateCart_args();
      args.setCartId(cartId);
      args.setSourceId(sourceId);
      sendBase("validateCart", args);
    }

    public List<String> recv_validateCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      validateCart_result result = new validateCart_result();
      receiveBase(result, "validateCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scex != null) {
        throw result.scex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
    }

    public List<String> validateCartWithDealerCoupon(long cartId, long sourceId, String dealCoupon) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_validateCartWithDealerCoupon(cartId, sourceId, dealCoupon);
      return recv_validateCartWithDealerCoupon();
    }

    public void send_validateCartWithDealerCoupon(long cartId, long sourceId, String dealCoupon) throws org.apache.thrift.TException
    {
      validateCartWithDealerCoupon_args args = new validateCartWithDealerCoupon_args();
      args.setCartId(cartId);
      args.setSourceId(sourceId);
      args.setDealCoupon(dealCoupon);
      sendBase("validateCartWithDealerCoupon", args);
    }

    public List<String> recv_validateCartWithDealerCoupon() throws ShoppingCartException, org.apache.thrift.TException
    {
      validateCartWithDealerCoupon_result result = new validateCartWithDealerCoupon_result();
      receiveBase(result, "validateCartWithDealerCoupon");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scex != null) {
        throw result.scex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateCartWithDealerCoupon failed: unknown result");
    }

    public void mergeCart(long fromCartId, long toCartId) throws org.apache.thrift.TException
    {
      send_mergeCart(fromCartId, toCartId);
      recv_mergeCart();
    }

    public void send_mergeCart(long fromCartId, long toCartId) throws org.apache.thrift.TException
    {
      mergeCart_args args = new mergeCart_args();
      args.setFromCartId(fromCartId);
      args.setToCartId(toCartId);
      sendBase("mergeCart", args);
    }

    public void recv_mergeCart() throws org.apache.thrift.TException
    {
      mergeCart_result result = new mergeCart_result();
      receiveBase(result, "mergeCart");
      return;
    }

    public boolean checkOut(long cartId) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_checkOut(cartId);
      return recv_checkOut();
    }

    public void send_checkOut(long cartId) throws org.apache.thrift.TException
    {
      checkOut_args args = new checkOut_args();
      args.setCartId(cartId);
      sendBase("checkOut", args);
    }

    public boolean recv_checkOut() throws ShoppingCartException, org.apache.thrift.TException
    {
      checkOut_result result = new checkOut_result();
      receiveBase(result, "checkOut");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scex != null) {
        throw result.scex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
    }

    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_resetCart(cartId, items);
      return recv_resetCart();
    }

    public void send_resetCart(long cartId, Map<Long,Double> items) throws org.apache.thrift.TException
    {
      resetCart_args args = new resetCart_args();
      args.setCartId(cartId);
      args.setItems(items);
      sendBase("resetCart", args);
    }

    public boolean recv_resetCart() throws ShoppingCartException, org.apache.thrift.TException
    {
      resetCart_result result = new resetCart_result();
      receiveBase(result, "resetCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scex != null) {
        throw result.scex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
    }

    public long getUserCount(UserType userType) throws org.apache.thrift.TException
    {
      send_getUserCount(userType);
      return recv_getUserCount();
    }

    public void send_getUserCount(UserType userType) throws org.apache.thrift.TException
    {
      getUserCount_args args = new getUserCount_args();
      args.setUserType(userType);
      sendBase("getUserCount", args);
    }

    public long recv_getUserCount() throws org.apache.thrift.TException
    {
      getUserCount_result result = new getUserCount_result();
      receiveBase(result, "getUserCount");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
    }

    public List<User> getAllUsers(UserType userType, long startDate, long endDate) throws org.apache.thrift.TException
    {
      send_getAllUsers(userType, startDate, endDate);
      return recv_getAllUsers();
    }

    public void send_getAllUsers(UserType userType, long startDate, long endDate) throws org.apache.thrift.TException
    {
      getAllUsers_args args = new getAllUsers_args();
      args.setUserType(userType);
      args.setStartDate(startDate);
      args.setEndDate(endDate);
      sendBase("getAllUsers", args);
    }

    public List<User> recv_getAllUsers() throws org.apache.thrift.TException
    {
      getAllUsers_result result = new getAllUsers_result();
      receiveBase(result, "getAllUsers");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUsers failed: unknown result");
    }

    public List<Long> getMyResearchItems(long userId) throws WidgetException, org.apache.thrift.TException
    {
      send_getMyResearchItems(userId);
      return recv_getMyResearchItems();
    }

    public void send_getMyResearchItems(long userId) throws org.apache.thrift.TException
    {
      getMyResearchItems_args args = new getMyResearchItems_args();
      args.setUserId(userId);
      sendBase("getMyResearchItems", args);
    }

    public List<Long> recv_getMyResearchItems() throws WidgetException, org.apache.thrift.TException
    {
      getMyResearchItems_result result = new getMyResearchItems_result();
      receiveBase(result, "getMyResearchItems");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMyResearchItems failed: unknown result");
    }

    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, org.apache.thrift.TException
    {
      send_updateMyResearch(userId, itemId);
      return recv_updateMyResearch();
    }

    public void send_updateMyResearch(long userId, long itemId) throws org.apache.thrift.TException
    {
      updateMyResearch_args args = new updateMyResearch_args();
      args.setUserId(userId);
      args.setItemId(itemId);
      sendBase("updateMyResearch", args);
    }

    public boolean recv_updateMyResearch() throws WidgetException, org.apache.thrift.TException
    {
      updateMyResearch_result result = new updateMyResearch_result();
      receiveBase(result, "updateMyResearch");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
    }

    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, org.apache.thrift.TException
    {
      send_deleteItemFromMyResearch(userId, itemId);
      recv_deleteItemFromMyResearch();
    }

    public void send_deleteItemFromMyResearch(long userId, long itemId) throws org.apache.thrift.TException
    {
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
      args.setUserId(userId);
      args.setItemId(itemId);
      sendBase("deleteItemFromMyResearch", args);
    }

    public void recv_deleteItemFromMyResearch() throws WidgetException, org.apache.thrift.TException
    {
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
      receiveBase(result, "deleteItemFromMyResearch");
      if (result.scx != null) {
        throw result.scx;
      }
      return;
    }

    public List<Long> getBrowseHistoryItems(long userId) throws WidgetException, org.apache.thrift.TException
    {
      send_getBrowseHistoryItems(userId);
      return recv_getBrowseHistoryItems();
    }

    public void send_getBrowseHistoryItems(long userId) throws org.apache.thrift.TException
    {
      getBrowseHistoryItems_args args = new getBrowseHistoryItems_args();
      args.setUserId(userId);
      sendBase("getBrowseHistoryItems", args);
    }

    public List<Long> recv_getBrowseHistoryItems() throws WidgetException, org.apache.thrift.TException
    {
      getBrowseHistoryItems_result result = new getBrowseHistoryItems_result();
      receiveBase(result, "getBrowseHistoryItems");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scx != null) {
        throw result.scx;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBrowseHistoryItems failed: unknown result");
    }

    public void updateBrowseHistory(long userId, long itemId) throws org.apache.thrift.TException
    {
      send_updateBrowseHistory(userId, itemId);
      recv_updateBrowseHistory();
    }

    public void send_updateBrowseHistory(long userId, long itemId) throws org.apache.thrift.TException
    {
      updateBrowseHistory_args args = new updateBrowseHistory_args();
      args.setUserId(userId);
      args.setItemId(itemId);
      sendBase("updateBrowseHistory", args);
    }

    public void recv_updateBrowseHistory() throws org.apache.thrift.TException
    {
      updateBrowseHistory_result result = new updateBrowseHistory_result();
      receiveBase(result, "updateBrowseHistory");
      return;
    }

    public long getCartsWithCouponCount(String couponCode) throws org.apache.thrift.TException
    {
      send_getCartsWithCouponCount(couponCode);
      return recv_getCartsWithCouponCount();
    }

    public void send_getCartsWithCouponCount(String couponCode) throws org.apache.thrift.TException
    {
      getCartsWithCouponCount_args args = new getCartsWithCouponCount_args();
      args.setCouponCode(couponCode);
      sendBase("getCartsWithCouponCount", args);
    }

    public long recv_getCartsWithCouponCount() throws org.apache.thrift.TException
    {
      getCartsWithCouponCount_result result = new getCartsWithCouponCount_result();
      receiveBase(result, "getCartsWithCouponCount");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCartsWithCouponCount failed: unknown result");
    }

    public void increaseTrustLevel(long userId, double trustLevelDelta) throws org.apache.thrift.TException
    {
      send_increaseTrustLevel(userId, trustLevelDelta);
    }

    public void send_increaseTrustLevel(long userId, double trustLevelDelta) throws org.apache.thrift.TException
    {
      increaseTrustLevel_args args = new increaseTrustLevel_args();
      args.setUserId(userId);
      args.setTrustLevelDelta(trustLevelDelta);
      sendBase("increaseTrustLevel", args);
    }

    public double getTrustLevel(long userId) throws org.apache.thrift.TException
    {
      send_getTrustLevel(userId);
      return recv_getTrustLevel();
    }

    public void send_getTrustLevel(long userId) throws org.apache.thrift.TException
    {
      getTrustLevel_args args = new getTrustLevel_args();
      args.setUserId(userId);
      sendBase("getTrustLevel", args);
    }

    public double recv_getTrustLevel() throws org.apache.thrift.TException
    {
      getTrustLevel_result result = new getTrustLevel_result();
      receiveBase(result, "getTrustLevel");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrustLevel failed: unknown result");
    }

    public boolean showCODOption(long cartId, long sourceId, String pincode) throws org.apache.thrift.TException
    {
      send_showCODOption(cartId, sourceId, pincode);
      return recv_showCODOption();
    }

    public void send_showCODOption(long cartId, long sourceId, String pincode) throws org.apache.thrift.TException
    {
      showCODOption_args args = new showCODOption_args();
      args.setCartId(cartId);
      args.setSourceId(sourceId);
      args.setPincode(pincode);
      sendBase("showCODOption", args);
    }

    public boolean recv_showCODOption() throws org.apache.thrift.TException
    {
      showCODOption_result result = new showCODOption_result();
      receiveBase(result, "showCODOption");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "showCODOption failed: unknown result");
    }

    public List<String> getUserEmails(long startDate, long endDate) throws org.apache.thrift.TException
    {
      send_getUserEmails(startDate, endDate);
      return recv_getUserEmails();
    }

    public void send_getUserEmails(long startDate, long endDate) throws org.apache.thrift.TException
    {
      getUserEmails_args args = new getUserEmails_args();
      args.setStartDate(startDate);
      args.setEndDate(endDate);
      sendBase("getUserEmails", args);
    }

    public List<String> recv_getUserEmails() throws org.apache.thrift.TException
    {
      getUserEmails_result result = new getUserEmails_result();
      receiveBase(result, "getUserEmails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserEmails failed: unknown result");
    }

    public boolean insureItem(long itemId, long cartId, boolean toInsure, int insurerType) throws org.apache.thrift.TException
    {
      send_insureItem(itemId, cartId, toInsure, insurerType);
      return recv_insureItem();
    }

    public void send_insureItem(long itemId, long cartId, boolean toInsure, int insurerType) throws org.apache.thrift.TException
    {
      insureItem_args args = new insureItem_args();
      args.setItemId(itemId);
      args.setCartId(cartId);
      args.setToInsure(toInsure);
      args.setInsurerType(insurerType);
      sendBase("insureItem", args);
    }

    public boolean recv_insureItem() throws org.apache.thrift.TException
    {
      insureItem_result result = new insureItem_result();
      receiveBase(result, "insureItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insureItem failed: unknown result");
    }

    public boolean cancelInsurance(long cartId) throws org.apache.thrift.TException
    {
      send_cancelInsurance(cartId);
      return recv_cancelInsurance();
    }

    public void send_cancelInsurance(long cartId) throws org.apache.thrift.TException
    {
      cancelInsurance_args args = new cancelInsurance_args();
      args.setCartId(cartId);
      sendBase("cancelInsurance", args);
    }

    public boolean recv_cancelInsurance() throws org.apache.thrift.TException
    {
      cancelInsurance_result result = new cancelInsurance_result();
      receiveBase(result, "cancelInsurance");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelInsurance failed: unknown result");
    }

    public boolean storeInsuranceSpecificDetails(long addressId, String dob, String guardianName) throws org.apache.thrift.TException
    {
      send_storeInsuranceSpecificDetails(addressId, dob, guardianName);
      return recv_storeInsuranceSpecificDetails();
    }

    public void send_storeInsuranceSpecificDetails(long addressId, String dob, String guardianName) throws org.apache.thrift.TException
    {
      storeInsuranceSpecificDetails_args args = new storeInsuranceSpecificDetails_args();
      args.setAddressId(addressId);
      args.setDob(dob);
      args.setGuardianName(guardianName);
      sendBase("storeInsuranceSpecificDetails", args);
    }

    public boolean recv_storeInsuranceSpecificDetails() throws org.apache.thrift.TException
    {
      storeInsuranceSpecificDetails_result result = new storeInsuranceSpecificDetails_result();
      receiveBase(result, "storeInsuranceSpecificDetails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "storeInsuranceSpecificDetails failed: unknown result");
    }

    public boolean isInsuranceDetailPresent(long addressId) throws org.apache.thrift.TException
    {
      send_isInsuranceDetailPresent(addressId);
      return recv_isInsuranceDetailPresent();
    }

    public void send_isInsuranceDetailPresent(long addressId) throws org.apache.thrift.TException
    {
      isInsuranceDetailPresent_args args = new isInsuranceDetailPresent_args();
      args.setAddressId(addressId);
      sendBase("isInsuranceDetailPresent", args);
    }

    public boolean recv_isInsuranceDetailPresent() throws org.apache.thrift.TException
    {
      isInsuranceDetailPresent_result result = new isInsuranceDetailPresent_result();
      receiveBase(result, "isInsuranceDetailPresent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInsuranceDetailPresent failed: unknown result");
    }

    public List<Long> getProductsAddedToCart(long startDate, long endDate) throws org.apache.thrift.TException
    {
      send_getProductsAddedToCart(startDate, endDate);
      return recv_getProductsAddedToCart();
    }

    public void send_getProductsAddedToCart(long startDate, long endDate) throws org.apache.thrift.TException
    {
      getProductsAddedToCart_args args = new getProductsAddedToCart_args();
      args.setStartDate(startDate);
      args.setEndDate(endDate);
      sendBase("getProductsAddedToCart", args);
    }

    public List<Long> recv_getProductsAddedToCart() throws org.apache.thrift.TException
    {
      getProductsAddedToCart_result result = new getProductsAddedToCart_result();
      receiveBase(result, "getProductsAddedToCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProductsAddedToCart failed: unknown result");
    }

    public CartPlus validateCartPlus(long cartId, long sourceId, String dealerCoupon) throws ShoppingCartException, org.apache.thrift.TException
    {
      send_validateCartPlus(cartId, sourceId, dealerCoupon);
      return recv_validateCartPlus();
    }

    public void send_validateCartPlus(long cartId, long sourceId, String dealerCoupon) throws org.apache.thrift.TException
    {
      validateCartPlus_args args = new validateCartPlus_args();
      args.setCartId(cartId);
      args.setSourceId(sourceId);
      args.setDealerCoupon(dealerCoupon);
      sendBase("validateCartPlus", args);
    }

    public CartPlus recv_validateCartPlus() throws ShoppingCartException, org.apache.thrift.TException
    {
      validateCartPlus_result result = new validateCartPlus_result();
      receiveBase(result, "validateCartPlus");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.scex != null) {
        throw result.scex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateCartPlus failed: unknown result");
    }

    public boolean isPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      send_isPrivateDealUser(userId);
      return recv_isPrivateDealUser();
    }

    public void send_isPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      isPrivateDealUser_args args = new isPrivateDealUser_args();
      args.setUserId(userId);
      sendBase("isPrivateDealUser", args);
    }

    public boolean recv_isPrivateDealUser() throws org.apache.thrift.TException
    {
      isPrivateDealUser_result result = new isPrivateDealUser_result();
      receiveBase(result, "isPrivateDealUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isPrivateDealUser failed: unknown result");
    }

    public boolean addPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      send_addPrivateDealUser(userId);
      return recv_addPrivateDealUser();
    }

    public void send_addPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      addPrivateDealUser_args args = new addPrivateDealUser_args();
      args.setUserId(userId);
      sendBase("addPrivateDealUser", args);
    }

    public boolean recv_addPrivateDealUser() throws org.apache.thrift.TException
    {
      addPrivateDealUser_result result = new addPrivateDealUser_result();
      receiveBase(result, "addPrivateDealUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addPrivateDealUser failed: unknown result");
    }

    public boolean changePrivateDealUserStatus(long userId, boolean isActive) throws org.apache.thrift.TException
    {
      send_changePrivateDealUserStatus(userId, isActive);
      return recv_changePrivateDealUserStatus();
    }

    public void send_changePrivateDealUserStatus(long userId, boolean isActive) throws org.apache.thrift.TException
    {
      changePrivateDealUserStatus_args args = new changePrivateDealUserStatus_args();
      args.setUserId(userId);
      args.setIsActive(isActive);
      sendBase("changePrivateDealUserStatus", args);
    }

    public boolean recv_changePrivateDealUserStatus() throws org.apache.thrift.TException
    {
      changePrivateDealUserStatus_result result = new changePrivateDealUserStatus_result();
      receiveBase(result, "changePrivateDealUserStatus");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "changePrivateDealUserStatus failed: unknown result");
    }

    public PrivateDealUser getPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      send_getPrivateDealUser(userId);
      return recv_getPrivateDealUser();
    }

    public void send_getPrivateDealUser(long userId) throws org.apache.thrift.TException
    {
      getPrivateDealUser_args args = new getPrivateDealUser_args();
      args.setUserId(userId);
      sendBase("getPrivateDealUser", args);
    }

    public PrivateDealUser recv_getPrivateDealUser() throws org.apache.thrift.TException
    {
      getPrivateDealUser_result result = new getPrivateDealUser_result();
      receiveBase(result, "getPrivateDealUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrivateDealUser failed: unknown result");
    }

    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException
    {
      send_registerCounter(counter, userId);
      return recv_registerCounter();
    }

    public void send_registerCounter(Counter counter, long userId) throws org.apache.thrift.TException
    {
      registerCounter_args args = new registerCounter_args();
      args.setCounter(counter);
      args.setUserId(userId);
      sendBase("registerCounter", args);
    }

    public Map<String,String> recv_registerCounter() throws org.apache.thrift.TException
    {
      registerCounter_result result = new registerCounter_result();
      receiveBase(result, "registerCounter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerCounter failed: unknown result");
    }

    public List<Counter> searchCounter(String type1, String searchString) throws org.apache.thrift.TException
    {
      send_searchCounter(type1, searchString);
      return recv_searchCounter();
    }

    public void send_searchCounter(String type1, String searchString) throws org.apache.thrift.TException
    {
      searchCounter_args args = new searchCounter_args();
      args.setType1(type1);
      args.setSearchString(searchString);
      sendBase("searchCounter", args);
    }

    public List<Counter> recv_searchCounter() throws org.apache.thrift.TException
    {
      searchCounter_result result = new searchCounter_result();
      receiveBase(result, "searchCounter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchCounter failed: unknown result");
    }

    public Counter getCounterByUserId(long userId) throws org.apache.thrift.TException
    {
      send_getCounterByUserId(userId);
      return recv_getCounterByUserId();
    }

    public void send_getCounterByUserId(long userId) throws org.apache.thrift.TException
    {
      getCounterByUserId_args args = new getCounterByUserId_args();
      args.setUserId(userId);
      sendBase("getCounterByUserId", args);
    }

    public Counter recv_getCounterByUserId() throws org.apache.thrift.TException
    {
      getCounterByUserId_result result = new getCounterByUserId_result();
      receiveBase(result, "getCounterByUserId");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCounterByUserId failed: unknown result");
    }

    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException
    {
      send_getAllUsersByCounter(counterId);
      return recv_getAllUsersByCounter();
    }

    public void send_getAllUsersByCounter(long counterId) throws org.apache.thrift.TException
    {
      getAllUsersByCounter_args args = new getAllUsersByCounter_args();
      args.setCounterId(counterId);
      sendBase("getAllUsersByCounter", args);
    }

    public List<User> recv_getAllUsersByCounter() throws org.apache.thrift.TException
    {
      getAllUsersByCounter_result result = new getAllUsersByCounter_result();
      receiveBase(result, "getAllUsersByCounter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUsersByCounter failed: unknown result");
    }

    public String getActiveAccessTokenForUser(long userId, String source) throws org.apache.thrift.TException
    {
      send_getActiveAccessTokenForUser(userId, source);
      return recv_getActiveAccessTokenForUser();
    }

    public void send_getActiveAccessTokenForUser(long userId, String source) throws org.apache.thrift.TException
    {
      getActiveAccessTokenForUser_args args = new getActiveAccessTokenForUser_args();
      args.setUserId(userId);
      args.setSource(source);
      sendBase("getActiveAccessTokenForUser", args);
    }

    public String recv_getActiveAccessTokenForUser() throws org.apache.thrift.TException
    {
      getActiveAccessTokenForUser_result result = new getActiveAccessTokenForUser_result();
      receiveBase(result, "getActiveAccessTokenForUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveAccessTokenForUser failed: unknown result");
    }

    public boolean validateAccessToken(String accessToken) throws org.apache.thrift.TException
    {
      send_validateAccessToken(accessToken);
      return recv_validateAccessToken();
    }

    public void send_validateAccessToken(String accessToken) throws org.apache.thrift.TException
    {
      validateAccessToken_args args = new validateAccessToken_args();
      args.setAccessToken(accessToken);
      sendBase("validateAccessToken", args);
    }

    public boolean recv_validateAccessToken() throws org.apache.thrift.TException
    {
      validateAccessToken_result result = new validateAccessToken_result();
      receiveBase(result, "validateAccessToken");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateAccessToken failed: unknown result");
    }

    public boolean addItemsToCart(long cartId, List<ItemQuantity> itemQty, String couponCode) throws org.apache.thrift.TException
    {
      send_addItemsToCart(cartId, itemQty, couponCode);
      return recv_addItemsToCart();
    }

    public void send_addItemsToCart(long cartId, List<ItemQuantity> itemQty, String couponCode) throws org.apache.thrift.TException
    {
      addItemsToCart_args args = new addItemsToCart_args();
      args.setCartId(cartId);
      args.setItemQty(itemQty);
      args.setCouponCode(couponCode);
      sendBase("addItemsToCart", args);
    }

    public boolean recv_addItemsToCart() throws org.apache.thrift.TException
    {
      addItemsToCart_result result = new addItemsToCart_result();
      receiveBase(result, "addItemsToCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addItemsToCart failed: unknown result");
    }

    public String validateCartNew(long cartId, String pinCode, long sourceId) throws org.apache.thrift.TException
    {
      send_validateCartNew(cartId, pinCode, sourceId);
      return recv_validateCartNew();
    }

    public void send_validateCartNew(long cartId, String pinCode, long sourceId) throws org.apache.thrift.TException
    {
      validateCartNew_args args = new validateCartNew_args();
      args.setCartId(cartId);
      args.setPinCode(pinCode);
      args.setSourceId(sourceId);
      sendBase("validateCartNew", args);
    }

    public String recv_validateCartNew() throws org.apache.thrift.TException
    {
      validateCartNew_result result = new validateCartNew_result();
      receiveBase(result, "validateCartNew");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateCartNew failed: unknown result");
    }

    public boolean isAddressEditableForCounter(long userId) throws org.apache.thrift.TException
    {
      send_isAddressEditableForCounter(userId);
      return recv_isAddressEditableForCounter();
    }

    public void send_isAddressEditableForCounter(long userId) throws org.apache.thrift.TException
    {
      isAddressEditableForCounter_args args = new isAddressEditableForCounter_args();
      args.setUserId(userId);
      sendBase("isAddressEditableForCounter", args);
    }

    public boolean recv_isAddressEditableForCounter() throws org.apache.thrift.TException
    {
      isAddressEditableForCounter_result result = new isAddressEditableForCounter_result();
      receiveBase(result, "isAddressEditableForCounter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isAddressEditableForCounter failed: unknown result");
    }

    public Address getBillingAddressForUser(long userId) throws org.apache.thrift.TException
    {
      send_getBillingAddressForUser(userId);
      return recv_getBillingAddressForUser();
    }

    public void send_getBillingAddressForUser(long userId) throws org.apache.thrift.TException
    {
      getBillingAddressForUser_args args = new getBillingAddressForUser_args();
      args.setUserId(userId);
      sendBase("getBillingAddressForUser", args);
    }

    public Address recv_getBillingAddressForUser() throws org.apache.thrift.TException
    {
      getBillingAddressForUser_result result = new getBillingAddressForUser_result();
      receiveBase(result, "getBillingAddressForUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBillingAddressForUser failed: unknown result");
    }

    public boolean isCreditorAssigned(long userId) throws org.apache.thrift.TException
    {
      send_isCreditorAssigned(userId);
      return recv_isCreditorAssigned();
    }

    public void send_isCreditorAssigned(long userId) throws org.apache.thrift.TException
    {
      isCreditorAssigned_args args = new isCreditorAssigned_args();
      args.setUserId(userId);
      sendBase("isCreditorAssigned", args);
    }

    public boolean recv_isCreditorAssigned() throws org.apache.thrift.TException
    {
      isCreditorAssigned_result result = new isCreditorAssigned_result();
      receiveBase(result, "isCreditorAssigned");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isCreditorAssigned failed: unknown result");
    }

    public boolean isTaxInvoiceEnabledUser(long userId) throws org.apache.thrift.TException
    {
      send_isTaxInvoiceEnabledUser(userId);
      return recv_isTaxInvoiceEnabledUser();
    }

    public void send_isTaxInvoiceEnabledUser(long userId) throws org.apache.thrift.TException
    {
      isTaxInvoiceEnabledUser_args args = new isTaxInvoiceEnabledUser_args();
      args.setUserId(userId);
      sendBase("isTaxInvoiceEnabledUser", args);
    }

    public boolean recv_isTaxInvoiceEnabledUser() throws org.apache.thrift.TException
    {
      isTaxInvoiceEnabledUser_result result = new isTaxInvoiceEnabledUser_result();
      receiveBase(result, "isTaxInvoiceEnabledUser");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTaxInvoiceEnabledUser failed: unknown result");
    }

    public boolean taxInvoiceAvailable(long addressId) throws org.apache.thrift.TException
    {
      send_taxInvoiceAvailable(addressId);
      return recv_taxInvoiceAvailable();
    }

    public void send_taxInvoiceAvailable(long addressId) throws org.apache.thrift.TException
    {
      taxInvoiceAvailable_args args = new taxInvoiceAvailable_args();
      args.setAddressId(addressId);
      sendBase("taxInvoiceAvailable", args);
    }

    public boolean recv_taxInvoiceAvailable() throws org.apache.thrift.TException
    {
      taxInvoiceAvailable_result result = new taxInvoiceAvailable_result();
      receiveBase(result, "taxInvoiceAvailable");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "taxInvoiceAvailable failed: unknown result");
    }

    public Map<Long,List<Line>> getCartByValue(List<Long> cartIds) throws org.apache.thrift.TException
    {
      send_getCartByValue(cartIds);
      return recv_getCartByValue();
    }

    public void send_getCartByValue(List<Long> cartIds) throws org.apache.thrift.TException
    {
      getCartByValue_args args = new getCartByValue_args();
      args.setCartIds(cartIds);
      sendBase("getCartByValue", args);
    }

    public Map<Long,List<Line>> recv_getCartByValue() throws org.apache.thrift.TException
    {
      getCartByValue_result result = new getCartByValue_result();
      receiveBase(result, "getCartByValue");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
    }

    public Map<Long,String> getCounterName(List<Long> userIds) throws org.apache.thrift.TException
    {
      send_getCounterName(userIds);
      return recv_getCounterName();
    }

    public void send_getCounterName(List<Long> userIds) throws org.apache.thrift.TException
    {
      getCounterName_args args = new getCounterName_args();
      args.setUserIds(userIds);
      sendBase("getCounterName", args);
    }

    public Map<Long,String> recv_getCounterName() throws org.apache.thrift.TException
    {
      getCounterName_result result = new getCounterName_result();
      receiveBase(result, "getCounterName");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCounterName failed: unknown result");
    }

    public boolean setWalletAmountInCart(long cartId, double wallet_amount) throws org.apache.thrift.TException
    {
      send_setWalletAmountInCart(cartId, wallet_amount);
      return recv_setWalletAmountInCart();
    }

    public void send_setWalletAmountInCart(long cartId, double wallet_amount) throws org.apache.thrift.TException
    {
      setWalletAmountInCart_args args = new setWalletAmountInCart_args();
      args.setCartId(cartId);
      args.setWallet_amount(wallet_amount);
      sendBase("setWalletAmountInCart", args);
    }

    public boolean recv_setWalletAmountInCart() throws org.apache.thrift.TException
    {
      setWalletAmountInCart_result result = new setWalletAmountInCart_result();
      receiveBase(result, "setWalletAmountInCart");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setWalletAmountInCart failed: unknown result");
    }

  }
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void createAnonymousUser(String jsessionId, org.apache.thrift.async.AsyncMethodCallback<createAnonymousUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createAnonymousUser_call method_call = new createAnonymousUser_call(jsessionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createAnonymousUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String jsessionId;
      public createAnonymousUser_call(String jsessionId, org.apache.thrift.async.AsyncMethodCallback<createAnonymousUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.jsessionId = jsessionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createAnonymousUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createAnonymousUser_args args = new createAnonymousUser_args();
        args.setJsessionId(jsessionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_createAnonymousUser();
      }
    }

    public void getUserById(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserById_call method_call = new getUserById_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getUserById_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserById_args args = new getUserById_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_getUserById();
      }
    }

    public void getUserByCartId(long cartId, org.apache.thrift.async.AsyncMethodCallback<getUserByCartId_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserByCartId_call method_call = new getUserByCartId_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserByCartId_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public getUserByCartId_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<getUserByCartId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserByCartId", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserByCartId_args args = new getUserByCartId_args();
        args.setCartId(cartId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_getUserByCartId();
      }
    }

    public void getUserByEmail(String email, org.apache.thrift.async.AsyncMethodCallback<getUserByEmail_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserByEmail_call method_call = new getUserByEmail_call(email, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserByEmail_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String email;
      public getUserByEmail_call(String email, org.apache.thrift.async.AsyncMethodCallback<getUserByEmail_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.email = email;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserByEmail", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserByEmail_args args = new getUserByEmail_args();
        args.setEmail(email);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_getUserByEmail();
      }
    }

    public void getUserByMobileNumber(long mobileNumber, org.apache.thrift.async.AsyncMethodCallback<getUserByMobileNumber_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserByMobileNumber_call method_call = new getUserByMobileNumber_call(mobileNumber, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserByMobileNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long mobileNumber;
      public getUserByMobileNumber_call(long mobileNumber, org.apache.thrift.async.AsyncMethodCallback<getUserByMobileNumber_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.mobileNumber = mobileNumber;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserByMobileNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserByMobileNumber_args args = new getUserByMobileNumber_args();
        args.setMobileNumber(mobileNumber);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_getUserByMobileNumber();
      }
    }

    public void createUser(User user, org.apache.thrift.async.AsyncMethodCallback<createUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createUser_call method_call = new createUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private User user;
      public createUser_call(User user, org.apache.thrift.async.AsyncMethodCallback<createUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.user = user;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createUser_args args = new createUser_args();
        args.setUser(user);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_createUser();
      }
    }

    public void updateUser(User user, org.apache.thrift.async.AsyncMethodCallback<updateUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateUser_call method_call = new updateUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private User user;
      public updateUser_call(User user, org.apache.thrift.async.AsyncMethodCallback<updateUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.user = user;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateUser_args args = new updateUser_args();
        args.setUser(user);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws UserContextException, 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_updateUser();
      }
    }

    public void authenticateUser(String email, String password, org.apache.thrift.async.AsyncMethodCallback<authenticateUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      authenticateUser_call method_call = new authenticateUser_call(email, password, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class authenticateUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String email;
      private String password;
      public authenticateUser_call(String email, String password, org.apache.thrift.async.AsyncMethodCallback<authenticateUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.email = email;
        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("authenticateUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        authenticateUser_args args = new authenticateUser_args();
        args.setEmail(email);
        args.setPassword(password);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public User getResult() throws AuthenticationException, 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_authenticateUser();
      }
    }

    public void userExists(String email, org.apache.thrift.async.AsyncMethodCallback<userExists_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      userExists_call method_call = new userExists_call(email, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class userExists_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String email;
      public userExists_call(String email, org.apache.thrift.async.AsyncMethodCallback<userExists_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.email = email;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userExists", org.apache.thrift.protocol.TMessageType.CALL, 0));
        userExists_args args = new userExists_args();
        args.setEmail(email);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_userExists();
      }
    }

    public void addAddressForUser(long userId, Address address, boolean setDefault, org.apache.thrift.async.AsyncMethodCallback<addAddressForUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addAddressForUser_call method_call = new addAddressForUser_call(userId, address, setDefault, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addAddressForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private Address address;
      private boolean setDefault;
      public addAddressForUser_call(long userId, Address address, boolean setDefault, org.apache.thrift.async.AsyncMethodCallback<addAddressForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.address = address;
        this.setDefault = setDefault;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addAddressForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addAddressForUser_args args = new addAddressForUser_args();
        args.setUserId(userId);
        args.setAddress(address);
        args.setSetDefault(setDefault);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws UserContextException, 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_addAddressForUser();
      }
    }

    public void removeAddressForUser(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<removeAddressForUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeAddressForUser_call method_call = new removeAddressForUser_call(userid, addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeAddressForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userid;
      private long addressId;
      public removeAddressForUser_call(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<removeAddressForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userid = userid;
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeAddressForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeAddressForUser_args args = new removeAddressForUser_args();
        args.setUserid(userid);
        args.setAddressId(addressId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_removeAddressForUser();
      }
    }

    public void updateAddress(Address address, org.apache.thrift.async.AsyncMethodCallback<updateAddress_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateAddress_call method_call = new updateAddress_call(address, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Address address;
      public updateAddress_call(Address address, org.apache.thrift.async.AsyncMethodCallback<updateAddress_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.address = address;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateAddress", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateAddress_args args = new updateAddress_args();
        args.setAddress(address);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_updateAddress();
      }
    }

    public void updateCounter(Counter counter, org.apache.thrift.async.AsyncMethodCallback<updateCounter_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateCounter_call method_call = new updateCounter_call(counter, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Counter counter;
      public updateCounter_call(Counter counter, org.apache.thrift.async.AsyncMethodCallback<updateCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.counter = counter;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateCounter_args args = new updateCounter_args();
        args.setCounter(counter);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_updateCounter();
      }
    }

    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setUserAsLoggedIn_call method_call = new setUserAsLoggedIn_call(userId, timestamp, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setUserAsLoggedIn_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private long timestamp;
      public setUserAsLoggedIn_call(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedIn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.timestamp = timestamp;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserAsLoggedIn", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
        args.setUserId(userId);
        args.setTimestamp(timestamp);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_setUserAsLoggedIn();
      }
    }

    public void setUserAsLoggedOut(long userid, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedOut_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setUserAsLoggedOut_call method_call = new setUserAsLoggedOut_call(userid, timestamp, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setUserAsLoggedOut_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userid;
      private long timestamp;
      public setUserAsLoggedOut_call(long userid, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedOut_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userid = userid;
        this.timestamp = timestamp;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserAsLoggedOut", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
        args.setUserid(userid);
        args.setTimestamp(timestamp);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_setUserAsLoggedOut();
      }
    }

    public void setDefaultAddress(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<setDefaultAddress_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setDefaultAddress_call method_call = new setDefaultAddress_call(userid, addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setDefaultAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userid;
      private long addressId;
      public setDefaultAddress_call(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<setDefaultAddress_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userid = userid;
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setDefaultAddress", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setDefaultAddress_args args = new setDefaultAddress_args();
        args.setUserid(userid);
        args.setAddressId(addressId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_setDefaultAddress();
      }
    }

    public void updatePassword(long userid, String oldPassword, String newPassword, org.apache.thrift.async.AsyncMethodCallback<updatePassword_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updatePassword_call method_call = new updatePassword_call(userid, oldPassword, newPassword, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updatePassword_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userid;
      private String oldPassword;
      private String newPassword;
      public updatePassword_call(long userid, String oldPassword, String newPassword, org.apache.thrift.async.AsyncMethodCallback<updatePassword_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userid = userid;
        this.oldPassword = oldPassword;
        this.newPassword = newPassword;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePassword", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updatePassword_args args = new updatePassword_args();
        args.setUserid(userid);
        args.setOldPassword(oldPassword);
        args.setNewPassword(newPassword);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_updatePassword();
      }
    }

    public void forgotPassword(String email, String newPassword, org.apache.thrift.async.AsyncMethodCallback<forgotPassword_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      forgotPassword_call method_call = new forgotPassword_call(email, newPassword, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class forgotPassword_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String email;
      private String newPassword;
      public forgotPassword_call(String email, String newPassword, org.apache.thrift.async.AsyncMethodCallback<forgotPassword_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.email = email;
        this.newPassword = newPassword;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("forgotPassword", org.apache.thrift.protocol.TMessageType.CALL, 0));
        forgotPassword_args args = new forgotPassword_args();
        args.setEmail(email);
        args.setNewPassword(newPassword);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserContextException, 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_forgotPassword();
      }
    }

    public void getAllAddressesForUser(long userId, org.apache.thrift.async.AsyncMethodCallback<getAllAddressesForUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllAddressesForUser_call method_call = new getAllAddressesForUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllAddressesForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getAllAddressesForUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getAllAddressesForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAddressesForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Address> getResult() throws UserContextException, 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_getAllAddressesForUser();
      }
    }

    public void getAddressById(long addressId, org.apache.thrift.async.AsyncMethodCallback<getAddressById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAddressById_call method_call = new getAddressById_call(addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAddressById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long addressId;
      public getAddressById_call(long addressId, org.apache.thrift.async.AsyncMethodCallback<getAddressById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAddressById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAddressById_args args = new getAddressById_args();
        args.setAddressId(addressId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Address getResult() throws UserContextException, 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_getAddressById();
      }
    }

    public void getDefaultAddressId(long userId, org.apache.thrift.async.AsyncMethodCallback<getDefaultAddressId_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getDefaultAddressId_call method_call = new getDefaultAddressId_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getDefaultAddressId_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getDefaultAddressId_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getDefaultAddressId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDefaultAddressId", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getDefaultAddressId_args args = new getDefaultAddressId_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws UserContextException, 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_getDefaultAddressId();
      }
    }

    public void getDefaultPincode(long userId, org.apache.thrift.async.AsyncMethodCallback<getDefaultPincode_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getDefaultPincode_call method_call = new getDefaultPincode_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getDefaultPincode_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getDefaultPincode_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getDefaultPincode_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDefaultPincode", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getDefaultPincode_args args = new getDefaultPincode_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws UserContextException, 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_getDefaultPincode();
      }
    }

    public void saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message, org.apache.thrift.async.AsyncMethodCallback<saveUserCommunication_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      saveUserCommunication_call method_call = new saveUserCommunication_call(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class saveUserCommunication_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private String replyTo;
      private long communicationType;
      private long orderId;
      private String airwaybillNo;
      private String productName;
      private String subject;
      private String message;
      public saveUserCommunication_call(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message, org.apache.thrift.async.AsyncMethodCallback<saveUserCommunication_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.replyTo = replyTo;
        this.communicationType = communicationType;
        this.orderId = orderId;
        this.airwaybillNo = airwaybillNo;
        this.productName = productName;
        this.subject = subject;
        this.message = message;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("saveUserCommunication", org.apache.thrift.protocol.TMessageType.CALL, 0));
        saveUserCommunication_args args = new saveUserCommunication_args();
        args.setUserId(userId);
        args.setReplyTo(replyTo);
        args.setCommunicationType(communicationType);
        args.setOrderId(orderId);
        args.setAirwaybillNo(airwaybillNo);
        args.setProductName(productName);
        args.setSubject(subject);
        args.setMessage(message);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws UserCommunicationException, 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_saveUserCommunication();
      }
    }

    public void getUserCommunicationById(long id, org.apache.thrift.async.AsyncMethodCallback<getUserCommunicationById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserCommunicationById_call method_call = new getUserCommunicationById_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserCommunicationById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getUserCommunicationById_call(long id, org.apache.thrift.async.AsyncMethodCallback<getUserCommunicationById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserCommunicationById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserCommunicationById_args args = new getUserCommunicationById_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public UserCommunication getResult() throws UserCommunicationException, 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_getUserCommunicationById();
      }
    }

    public void getUserCommunicationByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserCommunicationByUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserCommunicationByUser_call method_call = new getUserCommunicationByUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserCommunicationByUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getUserCommunicationByUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserCommunicationByUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserCommunicationByUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<UserCommunication> getResult() throws UserCommunicationException, 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_getUserCommunicationByUser();
      }
    }

    public void getAllUserCommunications(org.apache.thrift.async.AsyncMethodCallback<getAllUserCommunications_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllUserCommunications_call method_call = new getAllUserCommunications_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllUserCommunications_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllUserCommunications_call(org.apache.thrift.async.AsyncMethodCallback<getAllUserCommunications_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserCommunications", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllUserCommunications_args args = new getAllUserCommunications_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<UserCommunication> getResult() throws UserCommunicationException, 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_getAllUserCommunications();
      }
    }

    public void removeUserCommunication(long id, org.apache.thrift.async.AsyncMethodCallback<removeUserCommunication_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeUserCommunication_call method_call = new removeUserCommunication_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeUserCommunication_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public removeUserCommunication_call(long id, org.apache.thrift.async.AsyncMethodCallback<removeUserCommunication_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUserCommunication", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeUserCommunication_args args = new removeUserCommunication_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws UserCommunicationException, 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_removeUserCommunication();
      }
    }

    public void createMasterAffiliate(String name, long addedOn, org.apache.thrift.async.AsyncMethodCallback<createMasterAffiliate_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createMasterAffiliate_call method_call = new createMasterAffiliate_call(name, addedOn, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createMasterAffiliate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String name;
      private long addedOn;
      public createMasterAffiliate_call(String name, long addedOn, org.apache.thrift.async.AsyncMethodCallback<createMasterAffiliate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.name = name;
        this.addedOn = addedOn;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createMasterAffiliate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createMasterAffiliate_args args = new createMasterAffiliate_args();
        args.setName(name);
        args.setAddedOn(addedOn);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public MasterAffiliate getResult() throws UserAffiliateException, 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_createMasterAffiliate();
      }
    }

    public void getAllMasterAffiliates(org.apache.thrift.async.AsyncMethodCallback<getAllMasterAffiliates_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllMasterAffiliates_call method_call = new getAllMasterAffiliates_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllMasterAffiliates_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllMasterAffiliates_call(org.apache.thrift.async.AsyncMethodCallback<getAllMasterAffiliates_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllMasterAffiliates", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllMasterAffiliates_args args = new getAllMasterAffiliates_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<MasterAffiliate> getResult() throws UserAffiliateException, 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_getAllMasterAffiliates();
      }
    }

    public void getMasterAffiliateById(long id, org.apache.thrift.async.AsyncMethodCallback<getMasterAffiliateById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getMasterAffiliateById_call method_call = new getMasterAffiliateById_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getMasterAffiliateById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getMasterAffiliateById_call(long id, org.apache.thrift.async.AsyncMethodCallback<getMasterAffiliateById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMasterAffiliateById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getMasterAffiliateById_args args = new getMasterAffiliateById_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public MasterAffiliate getResult() throws UserAffiliateException, 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_getMasterAffiliateById();
      }
    }

    public void getMasterAffiliateByName(String name, org.apache.thrift.async.AsyncMethodCallback<getMasterAffiliateByName_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getMasterAffiliateByName_call method_call = new getMasterAffiliateByName_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getMasterAffiliateByName_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String name;
      public getMasterAffiliateByName_call(String name, org.apache.thrift.async.AsyncMethodCallback<getMasterAffiliateByName_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMasterAffiliateByName", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getMasterAffiliateByName_args args = new getMasterAffiliateByName_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public MasterAffiliate getResult() throws UserAffiliateException, 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_getMasterAffiliateByName();
      }
    }

    public void createAffiliate(String name, String url, long masterAffiliateId, long addedOn, org.apache.thrift.async.AsyncMethodCallback<createAffiliate_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createAffiliate_call method_call = new createAffiliate_call(name, url, masterAffiliateId, addedOn, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createAffiliate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String name;
      private String url;
      private long masterAffiliateId;
      private long addedOn;
      public createAffiliate_call(String name, String url, long masterAffiliateId, long addedOn, org.apache.thrift.async.AsyncMethodCallback<createAffiliate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.name = name;
        this.url = url;
        this.masterAffiliateId = masterAffiliateId;
        this.addedOn = addedOn;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createAffiliate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createAffiliate_args args = new createAffiliate_args();
        args.setName(name);
        args.setUrl(url);
        args.setMasterAffiliateId(masterAffiliateId);
        args.setAddedOn(addedOn);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Affiliate getResult() throws UserAffiliateException, 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_createAffiliate();
      }
    }

    public void getAffiliateById(long id, org.apache.thrift.async.AsyncMethodCallback<getAffiliateById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAffiliateById_call method_call = new getAffiliateById_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAffiliateById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getAffiliateById_call(long id, org.apache.thrift.async.AsyncMethodCallback<getAffiliateById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAffiliateById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAffiliateById_args args = new getAffiliateById_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Affiliate getResult() throws UserAffiliateException, 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_getAffiliateById();
      }
    }

    public void getAffiliateByName(String name, org.apache.thrift.async.AsyncMethodCallback<getAffiliateByName_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAffiliateByName_call method_call = new getAffiliateByName_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAffiliateByName_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String name;
      public getAffiliateByName_call(String name, org.apache.thrift.async.AsyncMethodCallback<getAffiliateByName_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAffiliateByName", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAffiliateByName_args args = new getAffiliateByName_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Affiliate getResult() throws UserAffiliateException, 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_getAffiliateByName();
      }
    }

    public void getTrackerById(long id, org.apache.thrift.async.AsyncMethodCallback<getTrackerById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrackerById_call method_call = new getTrackerById_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrackerById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getTrackerById_call(long id, org.apache.thrift.async.AsyncMethodCallback<getTrackerById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrackerById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrackerById_args args = new getTrackerById_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Tracker getResult() throws UserAffiliateException, 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_getTrackerById();
      }
    }

    public void getAffiliatesByMasterAffiliate(long id, org.apache.thrift.async.AsyncMethodCallback<getAffiliatesByMasterAffiliate_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAffiliatesByMasterAffiliate_call method_call = new getAffiliatesByMasterAffiliate_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAffiliatesByMasterAffiliate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getAffiliatesByMasterAffiliate_call(long id, org.apache.thrift.async.AsyncMethodCallback<getAffiliatesByMasterAffiliate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAffiliatesByMasterAffiliate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAffiliatesByMasterAffiliate_args args = new getAffiliatesByMasterAffiliate_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Affiliate> getResult() throws UserAffiliateException, 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_getAffiliatesByMasterAffiliate();
      }
    }

    public void addTrackLog(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn, org.apache.thrift.async.AsyncMethodCallback<addTrackLog_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addTrackLog_call method_call = new addTrackLog_call(affiliateId, userId, event, url, data, addedOn, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addTrackLog_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long affiliateId;
      private long userId;
      private TrackLogType event;
      private String url;
      private String data;
      private long addedOn;
      public addTrackLog_call(long affiliateId, long userId, TrackLogType event, String url, String data, long addedOn, org.apache.thrift.async.AsyncMethodCallback<addTrackLog_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.affiliateId = affiliateId;
        this.userId = userId;
        this.event = event;
        this.url = url;
        this.data = data;
        this.addedOn = addedOn;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addTrackLog", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addTrackLog_args args = new addTrackLog_args();
        args.setAffiliateId(affiliateId);
        args.setUserId(userId);
        args.setEvent(event);
        args.setUrl(url);
        args.setData(data);
        args.setAddedOn(addedOn);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws UserAffiliateException, 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_addTrackLog();
      }
    }

    public void getTrackLogById(long id, org.apache.thrift.async.AsyncMethodCallback<getTrackLogById_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrackLogById_call method_call = new getTrackLogById_call(id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrackLogById_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      public getTrackLogById_call(long id, org.apache.thrift.async.AsyncMethodCallback<getTrackLogById_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrackLogById", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrackLogById_args args = new getTrackLogById_args();
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TrackLog getResult() throws UserAffiliateException, 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_getTrackLogById();
      }
    }

    public void getTrackLogsByAffiliate(long affiliateId, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getTrackLogsByAffiliate_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrackLogsByAffiliate_call method_call = new getTrackLogsByAffiliate_call(affiliateId, startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrackLogsByAffiliate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long affiliateId;
      private long startDate;
      private long endDate;
      public getTrackLogsByAffiliate_call(long affiliateId, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getTrackLogsByAffiliate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.affiliateId = affiliateId;
        this.startDate = startDate;
        this.endDate = endDate;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrackLogsByAffiliate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrackLogsByAffiliate_args args = new getTrackLogsByAffiliate_args();
        args.setAffiliateId(affiliateId);
        args.setStartDate(startDate);
        args.setEndDate(endDate);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<TrackLog> getResult() throws UserAffiliateException, 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_getTrackLogsByAffiliate();
      }
    }

    public void getTrackLogsByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<getTrackLogsByUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrackLogsByUser_call method_call = new getTrackLogsByUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrackLogsByUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getTrackLogsByUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getTrackLogsByUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrackLogsByUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrackLogsByUser_args args = new getTrackLogsByUser_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<TrackLog> getResult() throws UserAffiliateException, 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_getTrackLogsByUser();
      }
    }

    public void getTrackLogs(long userId, String event, String url, org.apache.thrift.async.AsyncMethodCallback<getTrackLogs_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrackLogs_call method_call = new getTrackLogs_call(userId, event, url, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrackLogs_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private String event;
      private String url;
      public getTrackLogs_call(long userId, String event, String url, org.apache.thrift.async.AsyncMethodCallback<getTrackLogs_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.event = event;
        this.url = url;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrackLogs", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrackLogs_args args = new getTrackLogs_args();
        args.setUserId(userId);
        args.setEvent(event);
        args.setUrl(url);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<TrackLog> getResult() throws UserAffiliateException, 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_getTrackLogs();
      }
    }

    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<getCurrentCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCurrentCart_call method_call = new getCurrentCart_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCurrentCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getCurrentCart_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getCurrentCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCurrentCart_args args = new getCurrentCart_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Cart getResult() throws ShoppingCartException, 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_getCurrentCart();
      }
    }

    public void getCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<getCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCart_call method_call = new getCart_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public getCart_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<getCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCart_args args = new getCart_args();
        args.setCartId(cartId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Cart getResult() throws ShoppingCartException, 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_getCart();
      }
    }

    public void getCartsByTime(long from_time, long to_time, CartStatus status, org.apache.thrift.async.AsyncMethodCallback<getCartsByTime_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCartsByTime_call method_call = new getCartsByTime_call(from_time, to_time, status, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCartsByTime_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long from_time;
      private long to_time;
      private CartStatus status;
      public getCartsByTime_call(long from_time, long to_time, CartStatus status, org.apache.thrift.async.AsyncMethodCallback<getCartsByTime_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.from_time = from_time;
        this.to_time = to_time;
        this.status = status;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCartsByTime", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCartsByTime_args args = new getCartsByTime_args();
        args.setFrom_time(from_time);
        args.setTo_time(to_time);
        args.setStatus(status);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Cart> getResult() throws ShoppingCartException, 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_getCartsByTime();
      }
    }

    public void addItemToCart(long cartId, long itemId, long quantity, long sourceId, org.apache.thrift.async.AsyncMethodCallback<addItemToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addItemToCart_call method_call = new addItemToCart_call(cartId, itemId, quantity, sourceId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addItemToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long itemId;
      private long quantity;
      private long sourceId;
      public addItemToCart_call(long cartId, long itemId, long quantity, long sourceId, org.apache.thrift.async.AsyncMethodCallback<addItemToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.itemId = itemId;
        this.quantity = quantity;
        this.sourceId = sourceId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addItemToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addItemToCart_args args = new addItemToCart_args();
        args.setCartId(cartId);
        args.setItemId(itemId);
        args.setQuantity(quantity);
        args.setSourceId(sourceId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws ShoppingCartException, 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_addItemToCart();
      }
    }

    public void deleteItemFromCart(long cartId, long itemId, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteItemFromCart_call method_call = new deleteItemFromCart_call(cartId, itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteItemFromCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long itemId;
      public deleteItemFromCart_call(long cartId, long itemId, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteItemFromCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteItemFromCart_args args = new deleteItemFromCart_args();
        args.setCartId(cartId);
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_deleteItemFromCart();
      }
    }

    public void addAddressToCart(long cartId, long addressId, org.apache.thrift.async.AsyncMethodCallback<addAddressToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addAddressToCart_call method_call = new addAddressToCart_call(cartId, addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addAddressToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long addressId;
      public addAddressToCart_call(long cartId, long addressId, org.apache.thrift.async.AsyncMethodCallback<addAddressToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addAddressToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addAddressToCart_args args = new addAddressToCart_args();
        args.setCartId(cartId);
        args.setAddressId(addressId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_addAddressToCart();
      }
    }

    public void addStoreToCart(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<addStoreToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addStoreToCart_call method_call = new addStoreToCart_call(cartId, storeId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addStoreToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long storeId;
      public addStoreToCart_call(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<addStoreToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.storeId = storeId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addStoreToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addStoreToCart_args args = new addStoreToCart_args();
        args.setCartId(cartId);
        args.setStoreId(storeId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_addStoreToCart();
      }
    }

    public void applyCouponToCart(Cart cart, String couponCode, org.apache.thrift.async.AsyncMethodCallback<applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      applyCouponToCart_call method_call = new applyCouponToCart_call(cart, couponCode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class applyCouponToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Cart cart;
      private String couponCode;
      public applyCouponToCart_call(Cart cart, String couponCode, org.apache.thrift.async.AsyncMethodCallback<applyCouponToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cart = cart;
        this.couponCode = couponCode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("applyCouponToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        applyCouponToCart_args args = new applyCouponToCart_args();
        args.setCart(cart);
        args.setCouponCode(couponCode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_applyCouponToCart();
      }
    }

    public void removeCoupon(long cartId, org.apache.thrift.async.AsyncMethodCallback<removeCoupon_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeCoupon_call method_call = new removeCoupon_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public removeCoupon_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<removeCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeCoupon_args args = new removeCoupon_args();
        args.setCartId(cartId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_removeCoupon();
      }
    }

    public void deleteDiscountsFromCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<deleteDiscountsFromCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteDiscountsFromCart_call method_call = new deleteDiscountsFromCart_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteDiscountsFromCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public deleteDiscountsFromCart_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<deleteDiscountsFromCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDiscountsFromCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteDiscountsFromCart_args args = new deleteDiscountsFromCart_args();
        args.setCartId(cartId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_deleteDiscountsFromCart();
      }
    }

    public void saveDiscounts(List<Discount> discounts, org.apache.thrift.async.AsyncMethodCallback<saveDiscounts_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      saveDiscounts_call method_call = new saveDiscounts_call(discounts, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class saveDiscounts_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Discount> discounts;
      public saveDiscounts_call(List<Discount> discounts, org.apache.thrift.async.AsyncMethodCallback<saveDiscounts_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.discounts = discounts;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("saveDiscounts", org.apache.thrift.protocol.TMessageType.CALL, 0));
        saveDiscounts_args args = new saveDiscounts_args();
        args.setDiscounts(discounts);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws ShoppingCartException, 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_saveDiscounts();
      }
    }

    public void createOrders(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup, org.apache.thrift.async.AsyncMethodCallback<createOrders_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createOrders_call method_call = new createOrders_call(cartId, sessionSource, sessionStartTime, firstSource, firstSourceTime, userId, schemeId, orderSource, selfPickup, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private String sessionSource;
      private long sessionStartTime;
      private String firstSource;
      private long firstSourceTime;
      private long userId;
      private long schemeId;
      private long orderSource;
      private boolean selfPickup;
      public createOrders_call(long cartId, String sessionSource, long sessionStartTime, String firstSource, long firstSourceTime, long userId, long schemeId, long orderSource, boolean selfPickup, org.apache.thrift.async.AsyncMethodCallback<createOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.sessionSource = sessionSource;
        this.sessionStartTime = sessionStartTime;
        this.firstSource = firstSource;
        this.firstSourceTime = firstSourceTime;
        this.userId = userId;
        this.schemeId = schemeId;
        this.orderSource = orderSource;
        this.selfPickup = selfPickup;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createOrders_args args = new createOrders_args();
        args.setCartId(cartId);
        args.setSessionSource(sessionSource);
        args.setSessionStartTime(sessionStartTime);
        args.setFirstSource(firstSource);
        args.setFirstSourceTime(firstSourceTime);
        args.setUserId(userId);
        args.setSchemeId(schemeId);
        args.setOrderSource(orderSource);
        args.setSelfPickup(selfPickup);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws ShoppingCartException, 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_createOrders();
      }
    }

    public void validateCart(long cartId, long sourceId, org.apache.thrift.async.AsyncMethodCallback<validateCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      validateCart_call method_call = new validateCart_call(cartId, sourceId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class validateCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long sourceId;
      public validateCart_call(long cartId, long sourceId, org.apache.thrift.async.AsyncMethodCallback<validateCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.sourceId = sourceId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        validateCart_args args = new validateCart_args();
        args.setCartId(cartId);
        args.setSourceId(sourceId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<String> getResult() throws ShoppingCartException, 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_validateCart();
      }
    }

    public void validateCartWithDealerCoupon(long cartId, long sourceId, String dealCoupon, org.apache.thrift.async.AsyncMethodCallback<validateCartWithDealerCoupon_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      validateCartWithDealerCoupon_call method_call = new validateCartWithDealerCoupon_call(cartId, sourceId, dealCoupon, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class validateCartWithDealerCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long sourceId;
      private String dealCoupon;
      public validateCartWithDealerCoupon_call(long cartId, long sourceId, String dealCoupon, org.apache.thrift.async.AsyncMethodCallback<validateCartWithDealerCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.sourceId = sourceId;
        this.dealCoupon = dealCoupon;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateCartWithDealerCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
        validateCartWithDealerCoupon_args args = new validateCartWithDealerCoupon_args();
        args.setCartId(cartId);
        args.setSourceId(sourceId);
        args.setDealCoupon(dealCoupon);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<String> getResult() throws ShoppingCartException, 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_validateCartWithDealerCoupon();
      }
    }

    public void mergeCart(long fromCartId, long toCartId, org.apache.thrift.async.AsyncMethodCallback<mergeCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      mergeCart_call method_call = new mergeCart_call(fromCartId, toCartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class mergeCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long fromCartId;
      private long toCartId;
      public mergeCart_call(long fromCartId, long toCartId, org.apache.thrift.async.AsyncMethodCallback<mergeCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.fromCartId = fromCartId;
        this.toCartId = toCartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mergeCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        mergeCart_args args = new mergeCart_args();
        args.setFromCartId(fromCartId);
        args.setToCartId(toCartId);
        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_mergeCart();
      }
    }

    public void checkOut(long cartId, org.apache.thrift.async.AsyncMethodCallback<checkOut_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      checkOut_call method_call = new checkOut_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class checkOut_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public checkOut_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<checkOut_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkOut", org.apache.thrift.protocol.TMessageType.CALL, 0));
        checkOut_args args = new checkOut_args();
        args.setCartId(cartId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws ShoppingCartException, 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_checkOut();
      }
    }

    public void resetCart(long cartId, Map<Long,Double> items, org.apache.thrift.async.AsyncMethodCallback<resetCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      resetCart_call method_call = new resetCart_call(cartId, items, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class resetCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private Map<Long,Double> items;
      public resetCart_call(long cartId, Map<Long,Double> items, org.apache.thrift.async.AsyncMethodCallback<resetCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.items = items;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        resetCart_args args = new resetCart_args();
        args.setCartId(cartId);
        args.setItems(items);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws ShoppingCartException, 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_resetCart();
      }
    }

    public void getUserCount(UserType userType, org.apache.thrift.async.AsyncMethodCallback<getUserCount_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserCount_call method_call = new getUserCount_call(userType, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserCount_call extends org.apache.thrift.async.TAsyncMethodCall {
      private UserType userType;
      public getUserCount_call(UserType userType, org.apache.thrift.async.AsyncMethodCallback<getUserCount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userType = userType;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserCount", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserCount_args args = new getUserCount_args();
        args.setUserType(userType);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long 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_getUserCount();
      }
    }

    public void getAllUsers(UserType userType, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getAllUsers_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllUsers_call method_call = new getAllUsers_call(userType, startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
      private UserType userType;
      private long startDate;
      private long endDate;
      public getAllUsers_call(UserType userType, long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getAllUsers_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userType = userType;
        this.startDate = startDate;
        this.endDate = endDate;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllUsers_args args = new getAllUsers_args();
        args.setUserType(userType);
        args.setStartDate(startDate);
        args.setEndDate(endDate);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<User> 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_getAllUsers();
      }
    }

    public void getMyResearchItems(long userId, org.apache.thrift.async.AsyncMethodCallback<getMyResearchItems_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getMyResearchItems_call method_call = new getMyResearchItems_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getMyResearchItems_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getMyResearchItems_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getMyResearchItems_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMyResearchItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getMyResearchItems_args args = new getMyResearchItems_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws WidgetException, 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_getMyResearchItems();
      }
    }

    public void updateMyResearch(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<updateMyResearch_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateMyResearch_call method_call = new updateMyResearch_call(userId, itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateMyResearch_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private long itemId;
      public updateMyResearch_call(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<updateMyResearch_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateMyResearch", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateMyResearch_args args = new updateMyResearch_args();
        args.setUserId(userId);
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws WidgetException, 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_updateMyResearch();
      }
    }

    public void deleteItemFromMyResearch(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromMyResearch_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteItemFromMyResearch_call method_call = new deleteItemFromMyResearch_call(userId, itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteItemFromMyResearch_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private long itemId;
      public deleteItemFromMyResearch_call(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromMyResearch_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteItemFromMyResearch", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
        args.setUserId(userId);
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws WidgetException, 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_deleteItemFromMyResearch();
      }
    }

    public void getBrowseHistoryItems(long userId, org.apache.thrift.async.AsyncMethodCallback<getBrowseHistoryItems_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getBrowseHistoryItems_call method_call = new getBrowseHistoryItems_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getBrowseHistoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getBrowseHistoryItems_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getBrowseHistoryItems_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBrowseHistoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getBrowseHistoryItems_args args = new getBrowseHistoryItems_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws WidgetException, 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_getBrowseHistoryItems();
      }
    }

    public void updateBrowseHistory(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<updateBrowseHistory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateBrowseHistory_call method_call = new updateBrowseHistory_call(userId, itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateBrowseHistory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private long itemId;
      public updateBrowseHistory_call(long userId, long itemId, org.apache.thrift.async.AsyncMethodCallback<updateBrowseHistory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateBrowseHistory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateBrowseHistory_args args = new updateBrowseHistory_args();
        args.setUserId(userId);
        args.setItemId(itemId);
        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_updateBrowseHistory();
      }
    }

    public void getCartsWithCouponCount(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCartsWithCouponCount_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCartsWithCouponCount_call method_call = new getCartsWithCouponCount_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCartsWithCouponCount_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String couponCode;
      public getCartsWithCouponCount_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<getCartsWithCouponCount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.couponCode = couponCode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCartsWithCouponCount", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCartsWithCouponCount_args args = new getCartsWithCouponCount_args();
        args.setCouponCode(couponCode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long 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_getCartsWithCouponCount();
      }
    }

    public void increaseTrustLevel(long userId, double trustLevelDelta, org.apache.thrift.async.AsyncMethodCallback<increaseTrustLevel_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      increaseTrustLevel_call method_call = new increaseTrustLevel_call(userId, trustLevelDelta, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class increaseTrustLevel_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private double trustLevelDelta;
      public increaseTrustLevel_call(long userId, double trustLevelDelta, org.apache.thrift.async.AsyncMethodCallback<increaseTrustLevel_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, true);
        this.userId = userId;
        this.trustLevelDelta = trustLevelDelta;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("increaseTrustLevel", org.apache.thrift.protocol.TMessageType.CALL, 0));
        increaseTrustLevel_args args = new increaseTrustLevel_args();
        args.setUserId(userId);
        args.setTrustLevelDelta(trustLevelDelta);
        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);
      }
    }

    public void getTrustLevel(long userId, org.apache.thrift.async.AsyncMethodCallback<getTrustLevel_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTrustLevel_call method_call = new getTrustLevel_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTrustLevel_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getTrustLevel_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getTrustLevel_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTrustLevel", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTrustLevel_args args = new getTrustLevel_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public double 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_getTrustLevel();
      }
    }

    public void showCODOption(long cartId, long sourceId, String pincode, org.apache.thrift.async.AsyncMethodCallback<showCODOption_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      showCODOption_call method_call = new showCODOption_call(cartId, sourceId, pincode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class showCODOption_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long sourceId;
      private String pincode;
      public showCODOption_call(long cartId, long sourceId, String pincode, org.apache.thrift.async.AsyncMethodCallback<showCODOption_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.sourceId = sourceId;
        this.pincode = pincode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showCODOption", org.apache.thrift.protocol.TMessageType.CALL, 0));
        showCODOption_args args = new showCODOption_args();
        args.setCartId(cartId);
        args.setSourceId(sourceId);
        args.setPincode(pincode);
        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_showCODOption();
      }
    }

    public void getUserEmails(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getUserEmails_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserEmails_call method_call = new getUserEmails_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserEmails_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long startDate;
      private long endDate;
      public getUserEmails_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getUserEmails_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.startDate = startDate;
        this.endDate = endDate;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserEmails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserEmails_args args = new getUserEmails_args();
        args.setStartDate(startDate);
        args.setEndDate(endDate);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getUserEmails();
      }
    }

    public void insureItem(long itemId, long cartId, boolean toInsure, int insurerType, org.apache.thrift.async.AsyncMethodCallback<insureItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      insureItem_call method_call = new insureItem_call(itemId, cartId, toInsure, insurerType, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class insureItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long cartId;
      private boolean toInsure;
      private int insurerType;
      public insureItem_call(long itemId, long cartId, boolean toInsure, int insurerType, org.apache.thrift.async.AsyncMethodCallback<insureItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.cartId = cartId;
        this.toInsure = toInsure;
        this.insurerType = insurerType;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insureItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        insureItem_args args = new insureItem_args();
        args.setItemId(itemId);
        args.setCartId(cartId);
        args.setToInsure(toInsure);
        args.setInsurerType(insurerType);
        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_insureItem();
      }
    }

    public void cancelInsurance(long cartId, org.apache.thrift.async.AsyncMethodCallback<cancelInsurance_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      cancelInsurance_call method_call = new cancelInsurance_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class cancelInsurance_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      public cancelInsurance_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<cancelInsurance_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelInsurance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        cancelInsurance_args args = new cancelInsurance_args();
        args.setCartId(cartId);
        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_cancelInsurance();
      }
    }

    public void storeInsuranceSpecificDetails(long addressId, String dob, String guardianName, org.apache.thrift.async.AsyncMethodCallback<storeInsuranceSpecificDetails_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      storeInsuranceSpecificDetails_call method_call = new storeInsuranceSpecificDetails_call(addressId, dob, guardianName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class storeInsuranceSpecificDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long addressId;
      private String dob;
      private String guardianName;
      public storeInsuranceSpecificDetails_call(long addressId, String dob, String guardianName, org.apache.thrift.async.AsyncMethodCallback<storeInsuranceSpecificDetails_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.addressId = addressId;
        this.dob = dob;
        this.guardianName = guardianName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeInsuranceSpecificDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        storeInsuranceSpecificDetails_args args = new storeInsuranceSpecificDetails_args();
        args.setAddressId(addressId);
        args.setDob(dob);
        args.setGuardianName(guardianName);
        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_storeInsuranceSpecificDetails();
      }
    }

    public void isInsuranceDetailPresent(long addressId, org.apache.thrift.async.AsyncMethodCallback<isInsuranceDetailPresent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isInsuranceDetailPresent_call method_call = new isInsuranceDetailPresent_call(addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isInsuranceDetailPresent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long addressId;
      public isInsuranceDetailPresent_call(long addressId, org.apache.thrift.async.AsyncMethodCallback<isInsuranceDetailPresent_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isInsuranceDetailPresent", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isInsuranceDetailPresent_args args = new isInsuranceDetailPresent_args();
        args.setAddressId(addressId);
        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_isInsuranceDetailPresent();
      }
    }

    public void getProductsAddedToCart(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getProductsAddedToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getProductsAddedToCart_call method_call = new getProductsAddedToCart_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getProductsAddedToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long startDate;
      private long endDate;
      public getProductsAddedToCart_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getProductsAddedToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.startDate = startDate;
        this.endDate = endDate;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getProductsAddedToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getProductsAddedToCart_args args = new getProductsAddedToCart_args();
        args.setStartDate(startDate);
        args.setEndDate(endDate);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> 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_getProductsAddedToCart();
      }
    }

    public void validateCartPlus(long cartId, long sourceId, String dealerCoupon, org.apache.thrift.async.AsyncMethodCallback<validateCartPlus_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      validateCartPlus_call method_call = new validateCartPlus_call(cartId, sourceId, dealerCoupon, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class validateCartPlus_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private long sourceId;
      private String dealerCoupon;
      public validateCartPlus_call(long cartId, long sourceId, String dealerCoupon, org.apache.thrift.async.AsyncMethodCallback<validateCartPlus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.sourceId = sourceId;
        this.dealerCoupon = dealerCoupon;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateCartPlus", org.apache.thrift.protocol.TMessageType.CALL, 0));
        validateCartPlus_args args = new validateCartPlus_args();
        args.setCartId(cartId);
        args.setSourceId(sourceId);
        args.setDealerCoupon(dealerCoupon);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public CartPlus getResult() throws ShoppingCartException, 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_validateCartPlus();
      }
    }

    public void isPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<isPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isPrivateDealUser_call method_call = new isPrivateDealUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isPrivateDealUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public isPrivateDealUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<isPrivateDealUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isPrivateDealUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isPrivateDealUser_args args = new isPrivateDealUser_args();
        args.setUserId(userId);
        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_isPrivateDealUser();
      }
    }

    public void addPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<addPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addPrivateDealUser_call method_call = new addPrivateDealUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addPrivateDealUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public addPrivateDealUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<addPrivateDealUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addPrivateDealUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addPrivateDealUser_args args = new addPrivateDealUser_args();
        args.setUserId(userId);
        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_addPrivateDealUser();
      }
    }

    public void changePrivateDealUserStatus(long userId, boolean isActive, org.apache.thrift.async.AsyncMethodCallback<changePrivateDealUserStatus_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      changePrivateDealUserStatus_call method_call = new changePrivateDealUserStatus_call(userId, isActive, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changePrivateDealUserStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private boolean isActive;
      public changePrivateDealUserStatus_call(long userId, boolean isActive, org.apache.thrift.async.AsyncMethodCallback<changePrivateDealUserStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.isActive = isActive;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changePrivateDealUserStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
        changePrivateDealUserStatus_args args = new changePrivateDealUserStatus_args();
        args.setUserId(userId);
        args.setIsActive(isActive);
        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_changePrivateDealUserStatus();
      }
    }

    public void getPrivateDealUser(long userId, org.apache.thrift.async.AsyncMethodCallback<getPrivateDealUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPrivateDealUser_call method_call = new getPrivateDealUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPrivateDealUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getPrivateDealUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getPrivateDealUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrivateDealUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPrivateDealUser_args args = new getPrivateDealUser_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public PrivateDealUser 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_getPrivateDealUser();
      }
    }

    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<registerCounter_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      registerCounter_call method_call = new registerCounter_call(counter, userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class registerCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Counter counter;
      private long userId;
      public registerCounter_call(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<registerCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.counter = counter;
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        registerCounter_args args = new registerCounter_args();
        args.setCounter(counter);
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<String,String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_registerCounter();
      }
    }

    public void searchCounter(String type1, String searchString, org.apache.thrift.async.AsyncMethodCallback<searchCounter_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      searchCounter_call method_call = new searchCounter_call(type1, searchString, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class searchCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String type1;
      private String searchString;
      public searchCounter_call(String type1, String searchString, org.apache.thrift.async.AsyncMethodCallback<searchCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.type1 = type1;
        this.searchString = searchString;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("searchCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        searchCounter_args args = new searchCounter_args();
        args.setType1(type1);
        args.setSearchString(searchString);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Counter> 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_searchCounter();
      }
    }

    public void getCounterByUserId(long userId, org.apache.thrift.async.AsyncMethodCallback<getCounterByUserId_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCounterByUserId_call method_call = new getCounterByUserId_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCounterByUserId_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getCounterByUserId_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getCounterByUserId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCounterByUserId", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCounterByUserId_args args = new getCounterByUserId_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Counter 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_getCounterByUserId();
      }
    }

    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllUsersByCounter_call method_call = new getAllUsersByCounter_call(counterId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllUsersByCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long counterId;
      public getAllUsersByCounter_call(long counterId, org.apache.thrift.async.AsyncMethodCallback<getAllUsersByCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.counterId = counterId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUsersByCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllUsersByCounter_args args = new getAllUsersByCounter_args();
        args.setCounterId(counterId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<User> 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_getAllUsersByCounter();
      }
    }

    public void getActiveAccessTokenForUser(long userId, String source, org.apache.thrift.async.AsyncMethodCallback<getActiveAccessTokenForUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getActiveAccessTokenForUser_call method_call = new getActiveAccessTokenForUser_call(userId, source, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getActiveAccessTokenForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      private String source;
      public getActiveAccessTokenForUser_call(long userId, String source, org.apache.thrift.async.AsyncMethodCallback<getActiveAccessTokenForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
        this.source = source;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActiveAccessTokenForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getActiveAccessTokenForUser_args args = new getActiveAccessTokenForUser_args();
        args.setUserId(userId);
        args.setSource(source);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getActiveAccessTokenForUser();
      }
    }

    public void validateAccessToken(String accessToken, org.apache.thrift.async.AsyncMethodCallback<validateAccessToken_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      validateAccessToken_call method_call = new validateAccessToken_call(accessToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class validateAccessToken_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String accessToken;
      public validateAccessToken_call(String accessToken, org.apache.thrift.async.AsyncMethodCallback<validateAccessToken_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.accessToken = accessToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateAccessToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
        validateAccessToken_args args = new validateAccessToken_args();
        args.setAccessToken(accessToken);
        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_validateAccessToken();
      }
    }

    public void addItemsToCart(long cartId, List<ItemQuantity> itemQty, String couponCode, org.apache.thrift.async.AsyncMethodCallback<addItemsToCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addItemsToCart_call method_call = new addItemsToCart_call(cartId, itemQty, couponCode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addItemsToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private List<ItemQuantity> itemQty;
      private String couponCode;
      public addItemsToCart_call(long cartId, List<ItemQuantity> itemQty, String couponCode, org.apache.thrift.async.AsyncMethodCallback<addItemsToCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.itemQty = itemQty;
        this.couponCode = couponCode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addItemsToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addItemsToCart_args args = new addItemsToCart_args();
        args.setCartId(cartId);
        args.setItemQty(itemQty);
        args.setCouponCode(couponCode);
        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_addItemsToCart();
      }
    }

    public void validateCartNew(long cartId, String pinCode, long sourceId, org.apache.thrift.async.AsyncMethodCallback<validateCartNew_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      validateCartNew_call method_call = new validateCartNew_call(cartId, pinCode, sourceId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class validateCartNew_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private String pinCode;
      private long sourceId;
      public validateCartNew_call(long cartId, String pinCode, long sourceId, org.apache.thrift.async.AsyncMethodCallback<validateCartNew_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.pinCode = pinCode;
        this.sourceId = sourceId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateCartNew", org.apache.thrift.protocol.TMessageType.CALL, 0));
        validateCartNew_args args = new validateCartNew_args();
        args.setCartId(cartId);
        args.setPinCode(pinCode);
        args.setSourceId(sourceId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_validateCartNew();
      }
    }

    public void isAddressEditableForCounter(long userId, org.apache.thrift.async.AsyncMethodCallback<isAddressEditableForCounter_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isAddressEditableForCounter_call method_call = new isAddressEditableForCounter_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isAddressEditableForCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public isAddressEditableForCounter_call(long userId, org.apache.thrift.async.AsyncMethodCallback<isAddressEditableForCounter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isAddressEditableForCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isAddressEditableForCounter_args args = new isAddressEditableForCounter_args();
        args.setUserId(userId);
        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_isAddressEditableForCounter();
      }
    }

    public void getBillingAddressForUser(long userId, org.apache.thrift.async.AsyncMethodCallback<getBillingAddressForUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getBillingAddressForUser_call method_call = new getBillingAddressForUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getBillingAddressForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public getBillingAddressForUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getBillingAddressForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBillingAddressForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getBillingAddressForUser_args args = new getBillingAddressForUser_args();
        args.setUserId(userId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Address 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_getBillingAddressForUser();
      }
    }

    public void isCreditorAssigned(long userId, org.apache.thrift.async.AsyncMethodCallback<isCreditorAssigned_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isCreditorAssigned_call method_call = new isCreditorAssigned_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isCreditorAssigned_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public isCreditorAssigned_call(long userId, org.apache.thrift.async.AsyncMethodCallback<isCreditorAssigned_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isCreditorAssigned", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isCreditorAssigned_args args = new isCreditorAssigned_args();
        args.setUserId(userId);
        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_isCreditorAssigned();
      }
    }

    public void isTaxInvoiceEnabledUser(long userId, org.apache.thrift.async.AsyncMethodCallback<isTaxInvoiceEnabledUser_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isTaxInvoiceEnabledUser_call method_call = new isTaxInvoiceEnabledUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isTaxInvoiceEnabledUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long userId;
      public isTaxInvoiceEnabledUser_call(long userId, org.apache.thrift.async.AsyncMethodCallback<isTaxInvoiceEnabledUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userId = userId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTaxInvoiceEnabledUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isTaxInvoiceEnabledUser_args args = new isTaxInvoiceEnabledUser_args();
        args.setUserId(userId);
        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_isTaxInvoiceEnabledUser();
      }
    }

    public void taxInvoiceAvailable(long addressId, org.apache.thrift.async.AsyncMethodCallback<taxInvoiceAvailable_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      taxInvoiceAvailable_call method_call = new taxInvoiceAvailable_call(addressId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class taxInvoiceAvailable_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long addressId;
      public taxInvoiceAvailable_call(long addressId, org.apache.thrift.async.AsyncMethodCallback<taxInvoiceAvailable_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.addressId = addressId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("taxInvoiceAvailable", org.apache.thrift.protocol.TMessageType.CALL, 0));
        taxInvoiceAvailable_args args = new taxInvoiceAvailable_args();
        args.setAddressId(addressId);
        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_taxInvoiceAvailable();
      }
    }

    public void getCartByValue(List<Long> cartIds, org.apache.thrift.async.AsyncMethodCallback<getCartByValue_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCartByValue_call method_call = new getCartByValue_call(cartIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCartByValue_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> cartIds;
      public getCartByValue_call(List<Long> cartIds, org.apache.thrift.async.AsyncMethodCallback<getCartByValue_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartIds = cartIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCartByValue", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCartByValue_args args = new getCartByValue_args();
        args.setCartIds(cartIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,List<Line>> 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_getCartByValue();
      }
    }

    public void getCounterName(List<Long> userIds, org.apache.thrift.async.AsyncMethodCallback<getCounterName_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCounterName_call method_call = new getCounterName_call(userIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCounterName_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> userIds;
      public getCounterName_call(List<Long> userIds, org.apache.thrift.async.AsyncMethodCallback<getCounterName_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userIds = userIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCounterName", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCounterName_args args = new getCounterName_args();
        args.setUserIds(userIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getCounterName();
      }
    }

    public void setWalletAmountInCart(long cartId, double wallet_amount, org.apache.thrift.async.AsyncMethodCallback<setWalletAmountInCart_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setWalletAmountInCart_call method_call = new setWalletAmountInCart_call(cartId, wallet_amount, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setWalletAmountInCart_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long cartId;
      private double wallet_amount;
      public setWalletAmountInCart_call(long cartId, double wallet_amount, org.apache.thrift.async.AsyncMethodCallback<setWalletAmountInCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.cartId = cartId;
        this.wallet_amount = wallet_amount;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setWalletAmountInCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setWalletAmountInCart_args args = new setWalletAmountInCart_args();
        args.setCartId(cartId);
        args.setWallet_amount(wallet_amount);
        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_setWalletAmountInCart();
      }
    }

  }

  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("createAnonymousUser", new createAnonymousUser());
      processMap.put("getUserById", new getUserById());
      processMap.put("getUserByCartId", new getUserByCartId());
      processMap.put("getUserByEmail", new getUserByEmail());
      processMap.put("getUserByMobileNumber", new getUserByMobileNumber());
      processMap.put("createUser", new createUser());
      processMap.put("updateUser", new updateUser());
      processMap.put("authenticateUser", new authenticateUser());
      processMap.put("userExists", new userExists());
      processMap.put("addAddressForUser", new addAddressForUser());
      processMap.put("removeAddressForUser", new removeAddressForUser());
      processMap.put("updateAddress", new updateAddress());
      processMap.put("updateCounter", new updateCounter());
      processMap.put("setUserAsLoggedIn", new setUserAsLoggedIn());
      processMap.put("setUserAsLoggedOut", new setUserAsLoggedOut());
      processMap.put("setDefaultAddress", new setDefaultAddress());
      processMap.put("updatePassword", new updatePassword());
      processMap.put("forgotPassword", new forgotPassword());
      processMap.put("getAllAddressesForUser", new getAllAddressesForUser());
      processMap.put("getAddressById", new getAddressById());
      processMap.put("getDefaultAddressId", new getDefaultAddressId());
      processMap.put("getDefaultPincode", new getDefaultPincode());
      processMap.put("saveUserCommunication", new saveUserCommunication());
      processMap.put("getUserCommunicationById", new getUserCommunicationById());
      processMap.put("getUserCommunicationByUser", new getUserCommunicationByUser());
      processMap.put("getAllUserCommunications", new getAllUserCommunications());
      processMap.put("removeUserCommunication", new removeUserCommunication());
      processMap.put("createMasterAffiliate", new createMasterAffiliate());
      processMap.put("getAllMasterAffiliates", new getAllMasterAffiliates());
      processMap.put("getMasterAffiliateById", new getMasterAffiliateById());
      processMap.put("getMasterAffiliateByName", new getMasterAffiliateByName());
      processMap.put("createAffiliate", new createAffiliate());
      processMap.put("getAffiliateById", new getAffiliateById());
      processMap.put("getAffiliateByName", new getAffiliateByName());
      processMap.put("getTrackerById", new getTrackerById());
      processMap.put("getAffiliatesByMasterAffiliate", new getAffiliatesByMasterAffiliate());
      processMap.put("addTrackLog", new addTrackLog());
      processMap.put("getTrackLogById", new getTrackLogById());
      processMap.put("getTrackLogsByAffiliate", new getTrackLogsByAffiliate());
      processMap.put("getTrackLogsByUser", new getTrackLogsByUser());
      processMap.put("getTrackLogs", new getTrackLogs());
      processMap.put("getCurrentCart", new getCurrentCart());
      processMap.put("getCart", new getCart());
      processMap.put("getCartsByTime", new getCartsByTime());
      processMap.put("addItemToCart", new addItemToCart());
      processMap.put("deleteItemFromCart", new deleteItemFromCart());
      processMap.put("addAddressToCart", new addAddressToCart());
      processMap.put("addStoreToCart", new addStoreToCart());
      processMap.put("applyCouponToCart", new applyCouponToCart());
      processMap.put("removeCoupon", new removeCoupon());
      processMap.put("deleteDiscountsFromCart", new deleteDiscountsFromCart());
      processMap.put("saveDiscounts", new saveDiscounts());
      processMap.put("createOrders", new createOrders());
      processMap.put("validateCart", new validateCart());
      processMap.put("validateCartWithDealerCoupon", new validateCartWithDealerCoupon());
      processMap.put("mergeCart", new mergeCart());
      processMap.put("checkOut", new checkOut());
      processMap.put("resetCart", new resetCart());
      processMap.put("getUserCount", new getUserCount());
      processMap.put("getAllUsers", new getAllUsers());
      processMap.put("getMyResearchItems", new getMyResearchItems());
      processMap.put("updateMyResearch", new updateMyResearch());
      processMap.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
      processMap.put("getBrowseHistoryItems", new getBrowseHistoryItems());
      processMap.put("updateBrowseHistory", new updateBrowseHistory());
      processMap.put("getCartsWithCouponCount", new getCartsWithCouponCount());
      processMap.put("increaseTrustLevel", new increaseTrustLevel());
      processMap.put("getTrustLevel", new getTrustLevel());
      processMap.put("showCODOption", new showCODOption());
      processMap.put("getUserEmails", new getUserEmails());
      processMap.put("insureItem", new insureItem());
      processMap.put("cancelInsurance", new cancelInsurance());
      processMap.put("storeInsuranceSpecificDetails", new storeInsuranceSpecificDetails());
      processMap.put("isInsuranceDetailPresent", new isInsuranceDetailPresent());
      processMap.put("getProductsAddedToCart", new getProductsAddedToCart());
      processMap.put("validateCartPlus", new validateCartPlus());
      processMap.put("isPrivateDealUser", new isPrivateDealUser());
      processMap.put("addPrivateDealUser", new addPrivateDealUser());
      processMap.put("changePrivateDealUserStatus", new changePrivateDealUserStatus());
      processMap.put("getPrivateDealUser", new getPrivateDealUser());
      processMap.put("registerCounter", new registerCounter());
      processMap.put("searchCounter", new searchCounter());
      processMap.put("getCounterByUserId", new getCounterByUserId());
      processMap.put("getAllUsersByCounter", new getAllUsersByCounter());
      processMap.put("getActiveAccessTokenForUser", new getActiveAccessTokenForUser());
      processMap.put("validateAccessToken", new validateAccessToken());
      processMap.put("addItemsToCart", new addItemsToCart());
      processMap.put("validateCartNew", new validateCartNew());
      processMap.put("isAddressEditableForCounter", new isAddressEditableForCounter());
      processMap.put("getBillingAddressForUser", new getBillingAddressForUser());
      processMap.put("isCreditorAssigned", new isCreditorAssigned());
      processMap.put("isTaxInvoiceEnabledUser", new isTaxInvoiceEnabledUser());
      processMap.put("taxInvoiceAvailable", new taxInvoiceAvailable());
      processMap.put("getCartByValue", new getCartByValue());
      processMap.put("getCounterName", new getCounterName());
      processMap.put("setWalletAmountInCart", new setWalletAmountInCart());
      return processMap;
    }

    private static class createAnonymousUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createAnonymousUser_args> {
      public createAnonymousUser() {
        super("createAnonymousUser");
      }

      protected createAnonymousUser_args getEmptyArgsInstance() {
        return new createAnonymousUser_args();
      }

      protected createAnonymousUser_result getResult(I iface, createAnonymousUser_args args) throws org.apache.thrift.TException {
        createAnonymousUser_result result = new createAnonymousUser_result();
        try {
          result.success = iface.createAnonymousUser(args.jsessionId);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class getUserById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserById_args> {
      public getUserById() {
        super("getUserById");
      }

      protected getUserById_args getEmptyArgsInstance() {
        return new getUserById_args();
      }

      protected getUserById_result getResult(I iface, getUserById_args args) throws org.apache.thrift.TException {
        getUserById_result result = new getUserById_result();
        try {
          result.success = iface.getUserById(args.userId);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class getUserByCartId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserByCartId_args> {
      public getUserByCartId() {
        super("getUserByCartId");
      }

      protected getUserByCartId_args getEmptyArgsInstance() {
        return new getUserByCartId_args();
      }

      protected getUserByCartId_result getResult(I iface, getUserByCartId_args args) throws org.apache.thrift.TException {
        getUserByCartId_result result = new getUserByCartId_result();
        try {
          result.success = iface.getUserByCartId(args.cartId);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class getUserByEmail<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserByEmail_args> {
      public getUserByEmail() {
        super("getUserByEmail");
      }

      protected getUserByEmail_args getEmptyArgsInstance() {
        return new getUserByEmail_args();
      }

      protected getUserByEmail_result getResult(I iface, getUserByEmail_args args) throws org.apache.thrift.TException {
        getUserByEmail_result result = new getUserByEmail_result();
        try {
          result.success = iface.getUserByEmail(args.email);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class getUserByMobileNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserByMobileNumber_args> {
      public getUserByMobileNumber() {
        super("getUserByMobileNumber");
      }

      protected getUserByMobileNumber_args getEmptyArgsInstance() {
        return new getUserByMobileNumber_args();
      }

      protected getUserByMobileNumber_result getResult(I iface, getUserByMobileNumber_args args) throws org.apache.thrift.TException {
        getUserByMobileNumber_result result = new getUserByMobileNumber_result();
        try {
          result.success = iface.getUserByMobileNumber(args.mobileNumber);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class createUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createUser_args> {
      public createUser() {
        super("createUser");
      }

      protected createUser_args getEmptyArgsInstance() {
        return new createUser_args();
      }

      protected createUser_result getResult(I iface, createUser_args args) throws org.apache.thrift.TException {
        createUser_result result = new createUser_result();
        try {
          result.success = iface.createUser(args.user);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class updateUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateUser_args> {
      public updateUser() {
        super("updateUser");
      }

      protected updateUser_args getEmptyArgsInstance() {
        return new updateUser_args();
      }

      protected updateUser_result getResult(I iface, updateUser_args args) throws org.apache.thrift.TException {
        updateUser_result result = new updateUser_result();
        try {
          result.success = iface.updateUser(args.user);
        } catch (UserContextException ucex) {
          result.ucex = ucex;
        }
        return result;
      }
    }

    private static class authenticateUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, authenticateUser_args> {
      public authenticateUser() {
        super("authenticateUser");
      }

      protected authenticateUser_args getEmptyArgsInstance() {
        return new authenticateUser_args();
      }

      protected authenticateUser_result getResult(I iface, authenticateUser_args args) throws org.apache.thrift.TException {
        authenticateUser_result result = new authenticateUser_result();
        try {
          result.success = iface.authenticateUser(args.email, args.password);
        } catch (AuthenticationException auex) {
          result.auex = auex;
        }
        return result;
      }
    }

    private static class userExists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, userExists_args> {
      public userExists() {
        super("userExists");
      }

      protected userExists_args getEmptyArgsInstance() {
        return new userExists_args();
      }

      protected userExists_result getResult(I iface, userExists_args args) throws org.apache.thrift.TException {
        userExists_result result = new userExists_result();
        try {
          result.success = iface.userExists(args.email);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class addAddressForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addAddressForUser_args> {
      public addAddressForUser() {
        super("addAddressForUser");
      }

      protected addAddressForUser_args getEmptyArgsInstance() {
        return new addAddressForUser_args();
      }

      protected addAddressForUser_result getResult(I iface, addAddressForUser_args args) throws org.apache.thrift.TException {
        addAddressForUser_result result = new addAddressForUser_result();
        try {
          result.success = iface.addAddressForUser(args.userId, args.address, args.setDefault);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class removeAddressForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeAddressForUser_args> {
      public removeAddressForUser() {
        super("removeAddressForUser");
      }

      protected removeAddressForUser_args getEmptyArgsInstance() {
        return new removeAddressForUser_args();
      }

      protected removeAddressForUser_result getResult(I iface, removeAddressForUser_args args) throws org.apache.thrift.TException {
        removeAddressForUser_result result = new removeAddressForUser_result();
        try {
          result.success = iface.removeAddressForUser(args.userid, args.addressId);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class updateAddress<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateAddress_args> {
      public updateAddress() {
        super("updateAddress");
      }

      protected updateAddress_args getEmptyArgsInstance() {
        return new updateAddress_args();
      }

      protected updateAddress_result getResult(I iface, updateAddress_args args) throws org.apache.thrift.TException {
        updateAddress_result result = new updateAddress_result();
        try {
          result.success = iface.updateAddress(args.address);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class updateCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateCounter_args> {
      public updateCounter() {
        super("updateCounter");
      }

      protected updateCounter_args getEmptyArgsInstance() {
        return new updateCounter_args();
      }

      protected updateCounter_result getResult(I iface, updateCounter_args args) throws org.apache.thrift.TException {
        updateCounter_result result = new updateCounter_result();
        try {
          result.success = iface.updateCounter(args.counter);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class setUserAsLoggedIn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserAsLoggedIn_args> {
      public setUserAsLoggedIn() {
        super("setUserAsLoggedIn");
      }

      protected setUserAsLoggedIn_args getEmptyArgsInstance() {
        return new setUserAsLoggedIn_args();
      }

      protected setUserAsLoggedIn_result getResult(I iface, setUserAsLoggedIn_args args) throws org.apache.thrift.TException {
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
        try {
          result.success = iface.setUserAsLoggedIn(args.userId, args.timestamp);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class setUserAsLoggedOut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserAsLoggedOut_args> {
      public setUserAsLoggedOut() {
        super("setUserAsLoggedOut");
      }

      protected setUserAsLoggedOut_args getEmptyArgsInstance() {
        return new setUserAsLoggedOut_args();
      }

      protected setUserAsLoggedOut_result getResult(I iface, setUserAsLoggedOut_args args) throws org.apache.thrift.TException {
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
        try {
          result.success = iface.setUserAsLoggedOut(args.userid, args.timestamp);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class setDefaultAddress<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setDefaultAddress_args> {
      public setDefaultAddress() {
        super("setDefaultAddress");
      }

      protected setDefaultAddress_args getEmptyArgsInstance() {
        return new setDefaultAddress_args();
      }

      protected setDefaultAddress_result getResult(I iface, setDefaultAddress_args args) throws org.apache.thrift.TException {
        setDefaultAddress_result result = new setDefaultAddress_result();
        try {
          result.success = iface.setDefaultAddress(args.userid, args.addressId);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class updatePassword<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePassword_args> {
      public updatePassword() {
        super("updatePassword");
      }

      protected updatePassword_args getEmptyArgsInstance() {
        return new updatePassword_args();
      }

      protected updatePassword_result getResult(I iface, updatePassword_args args) throws org.apache.thrift.TException {
        updatePassword_result result = new updatePassword_result();
        try {
          result.success = iface.updatePassword(args.userid, args.oldPassword, args.newPassword);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class forgotPassword<I extends Iface> extends org.apache.thrift.ProcessFunction<I, forgotPassword_args> {
      public forgotPassword() {
        super("forgotPassword");
      }

      protected forgotPassword_args getEmptyArgsInstance() {
        return new forgotPassword_args();
      }

      protected forgotPassword_result getResult(I iface, forgotPassword_args args) throws org.apache.thrift.TException {
        forgotPassword_result result = new forgotPassword_result();
        try {
          result.success = iface.forgotPassword(args.email, args.newPassword);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getAllAddressesForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAddressesForUser_args> {
      public getAllAddressesForUser() {
        super("getAllAddressesForUser");
      }

      protected getAllAddressesForUser_args getEmptyArgsInstance() {
        return new getAllAddressesForUser_args();
      }

      protected getAllAddressesForUser_result getResult(I iface, getAllAddressesForUser_args args) throws org.apache.thrift.TException {
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
        try {
          result.success = iface.getAllAddressesForUser(args.userId);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getAddressById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAddressById_args> {
      public getAddressById() {
        super("getAddressById");
      }

      protected getAddressById_args getEmptyArgsInstance() {
        return new getAddressById_args();
      }

      protected getAddressById_result getResult(I iface, getAddressById_args args) throws org.apache.thrift.TException {
        getAddressById_result result = new getAddressById_result();
        try {
          result.success = iface.getAddressById(args.addressId);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getDefaultAddressId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDefaultAddressId_args> {
      public getDefaultAddressId() {
        super("getDefaultAddressId");
      }

      protected getDefaultAddressId_args getEmptyArgsInstance() {
        return new getDefaultAddressId_args();
      }

      protected getDefaultAddressId_result getResult(I iface, getDefaultAddressId_args args) throws org.apache.thrift.TException {
        getDefaultAddressId_result result = new getDefaultAddressId_result();
        try {
          result.success = iface.getDefaultAddressId(args.userId);
          result.setSuccessIsSet(true);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getDefaultPincode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDefaultPincode_args> {
      public getDefaultPincode() {
        super("getDefaultPincode");
      }

      protected getDefaultPincode_args getEmptyArgsInstance() {
        return new getDefaultPincode_args();
      }

      protected getDefaultPincode_result getResult(I iface, getDefaultPincode_args args) throws org.apache.thrift.TException {
        getDefaultPincode_result result = new getDefaultPincode_result();
        try {
          result.success = iface.getDefaultPincode(args.userId);
        } catch (UserContextException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class saveUserCommunication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, saveUserCommunication_args> {
      public saveUserCommunication() {
        super("saveUserCommunication");
      }

      protected saveUserCommunication_args getEmptyArgsInstance() {
        return new saveUserCommunication_args();
      }

      protected saveUserCommunication_result getResult(I iface, saveUserCommunication_args args) throws org.apache.thrift.TException {
        saveUserCommunication_result result = new saveUserCommunication_result();
        try {
          result.success = iface.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
          result.setSuccessIsSet(true);
        } catch (UserCommunicationException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getUserCommunicationById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserCommunicationById_args> {
      public getUserCommunicationById() {
        super("getUserCommunicationById");
      }

      protected getUserCommunicationById_args getEmptyArgsInstance() {
        return new getUserCommunicationById_args();
      }

      protected getUserCommunicationById_result getResult(I iface, getUserCommunicationById_args args) throws org.apache.thrift.TException {
        getUserCommunicationById_result result = new getUserCommunicationById_result();
        try {
          result.success = iface.getUserCommunicationById(args.id);
        } catch (UserCommunicationException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getUserCommunicationByUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserCommunicationByUser_args> {
      public getUserCommunicationByUser() {
        super("getUserCommunicationByUser");
      }

      protected getUserCommunicationByUser_args getEmptyArgsInstance() {
        return new getUserCommunicationByUser_args();
      }

      protected getUserCommunicationByUser_result getResult(I iface, getUserCommunicationByUser_args args) throws org.apache.thrift.TException {
        getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
        try {
          result.success = iface.getUserCommunicationByUser(args.userId);
        } catch (UserCommunicationException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class getAllUserCommunications<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserCommunications_args> {
      public getAllUserCommunications() {
        super("getAllUserCommunications");
      }

      protected getAllUserCommunications_args getEmptyArgsInstance() {
        return new getAllUserCommunications_args();
      }

      protected getAllUserCommunications_result getResult(I iface, getAllUserCommunications_args args) throws org.apache.thrift.TException {
        getAllUserCommunications_result result = new getAllUserCommunications_result();
        try {
          result.success = iface.getAllUserCommunications();
        } catch (UserCommunicationException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class removeUserCommunication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeUserCommunication_args> {
      public removeUserCommunication() {
        super("removeUserCommunication");
      }

      protected removeUserCommunication_args getEmptyArgsInstance() {
        return new removeUserCommunication_args();
      }

      protected removeUserCommunication_result getResult(I iface, removeUserCommunication_args args) throws org.apache.thrift.TException {
        removeUserCommunication_result result = new removeUserCommunication_result();
        try {
          iface.removeUserCommunication(args.id);
        } catch (UserCommunicationException ucx) {
          result.ucx = ucx;
        }
        return result;
      }
    }

    private static class createMasterAffiliate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createMasterAffiliate_args> {
      public createMasterAffiliate() {
        super("createMasterAffiliate");
      }

      protected createMasterAffiliate_args getEmptyArgsInstance() {
        return new createMasterAffiliate_args();
      }

      protected createMasterAffiliate_result getResult(I iface, createMasterAffiliate_args args) throws org.apache.thrift.TException {
        createMasterAffiliate_result result = new createMasterAffiliate_result();
        try {
          result.success = iface.createMasterAffiliate(args.name, args.addedOn);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getAllMasterAffiliates<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllMasterAffiliates_args> {
      public getAllMasterAffiliates() {
        super("getAllMasterAffiliates");
      }

      protected getAllMasterAffiliates_args getEmptyArgsInstance() {
        return new getAllMasterAffiliates_args();
      }

      protected getAllMasterAffiliates_result getResult(I iface, getAllMasterAffiliates_args args) throws org.apache.thrift.TException {
        getAllMasterAffiliates_result result = new getAllMasterAffiliates_result();
        try {
          result.success = iface.getAllMasterAffiliates();
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getMasterAffiliateById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMasterAffiliateById_args> {
      public getMasterAffiliateById() {
        super("getMasterAffiliateById");
      }

      protected getMasterAffiliateById_args getEmptyArgsInstance() {
        return new getMasterAffiliateById_args();
      }

      protected getMasterAffiliateById_result getResult(I iface, getMasterAffiliateById_args args) throws org.apache.thrift.TException {
        getMasterAffiliateById_result result = new getMasterAffiliateById_result();
        try {
          result.success = iface.getMasterAffiliateById(args.id);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getMasterAffiliateByName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMasterAffiliateByName_args> {
      public getMasterAffiliateByName() {
        super("getMasterAffiliateByName");
      }

      protected getMasterAffiliateByName_args getEmptyArgsInstance() {
        return new getMasterAffiliateByName_args();
      }

      protected getMasterAffiliateByName_result getResult(I iface, getMasterAffiliateByName_args args) throws org.apache.thrift.TException {
        getMasterAffiliateByName_result result = new getMasterAffiliateByName_result();
        try {
          result.success = iface.getMasterAffiliateByName(args.name);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class createAffiliate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createAffiliate_args> {
      public createAffiliate() {
        super("createAffiliate");
      }

      protected createAffiliate_args getEmptyArgsInstance() {
        return new createAffiliate_args();
      }

      protected createAffiliate_result getResult(I iface, createAffiliate_args args) throws org.apache.thrift.TException {
        createAffiliate_result result = new createAffiliate_result();
        try {
          result.success = iface.createAffiliate(args.name, args.url, args.masterAffiliateId, args.addedOn);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getAffiliateById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAffiliateById_args> {
      public getAffiliateById() {
        super("getAffiliateById");
      }

      protected getAffiliateById_args getEmptyArgsInstance() {
        return new getAffiliateById_args();
      }

      protected getAffiliateById_result getResult(I iface, getAffiliateById_args args) throws org.apache.thrift.TException {
        getAffiliateById_result result = new getAffiliateById_result();
        try {
          result.success = iface.getAffiliateById(args.id);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getAffiliateByName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAffiliateByName_args> {
      public getAffiliateByName() {
        super("getAffiliateByName");
      }

      protected getAffiliateByName_args getEmptyArgsInstance() {
        return new getAffiliateByName_args();
      }

      protected getAffiliateByName_result getResult(I iface, getAffiliateByName_args args) throws org.apache.thrift.TException {
        getAffiliateByName_result result = new getAffiliateByName_result();
        try {
          result.success = iface.getAffiliateByName(args.name);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getTrackerById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrackerById_args> {
      public getTrackerById() {
        super("getTrackerById");
      }

      protected getTrackerById_args getEmptyArgsInstance() {
        return new getTrackerById_args();
      }

      protected getTrackerById_result getResult(I iface, getTrackerById_args args) throws org.apache.thrift.TException {
        getTrackerById_result result = new getTrackerById_result();
        try {
          result.success = iface.getTrackerById(args.id);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getAffiliatesByMasterAffiliate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAffiliatesByMasterAffiliate_args> {
      public getAffiliatesByMasterAffiliate() {
        super("getAffiliatesByMasterAffiliate");
      }

      protected getAffiliatesByMasterAffiliate_args getEmptyArgsInstance() {
        return new getAffiliatesByMasterAffiliate_args();
      }

      protected getAffiliatesByMasterAffiliate_result getResult(I iface, getAffiliatesByMasterAffiliate_args args) throws org.apache.thrift.TException {
        getAffiliatesByMasterAffiliate_result result = new getAffiliatesByMasterAffiliate_result();
        try {
          result.success = iface.getAffiliatesByMasterAffiliate(args.id);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class addTrackLog<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addTrackLog_args> {
      public addTrackLog() {
        super("addTrackLog");
      }

      protected addTrackLog_args getEmptyArgsInstance() {
        return new addTrackLog_args();
      }

      protected addTrackLog_result getResult(I iface, addTrackLog_args args) throws org.apache.thrift.TException {
        addTrackLog_result result = new addTrackLog_result();
        try {
          result.success = iface.addTrackLog(args.affiliateId, args.userId, args.event, args.url, args.data, args.addedOn);
          result.setSuccessIsSet(true);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getTrackLogById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrackLogById_args> {
      public getTrackLogById() {
        super("getTrackLogById");
      }

      protected getTrackLogById_args getEmptyArgsInstance() {
        return new getTrackLogById_args();
      }

      protected getTrackLogById_result getResult(I iface, getTrackLogById_args args) throws org.apache.thrift.TException {
        getTrackLogById_result result = new getTrackLogById_result();
        try {
          result.success = iface.getTrackLogById(args.id);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getTrackLogsByAffiliate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrackLogsByAffiliate_args> {
      public getTrackLogsByAffiliate() {
        super("getTrackLogsByAffiliate");
      }

      protected getTrackLogsByAffiliate_args getEmptyArgsInstance() {
        return new getTrackLogsByAffiliate_args();
      }

      protected getTrackLogsByAffiliate_result getResult(I iface, getTrackLogsByAffiliate_args args) throws org.apache.thrift.TException {
        getTrackLogsByAffiliate_result result = new getTrackLogsByAffiliate_result();
        try {
          result.success = iface.getTrackLogsByAffiliate(args.affiliateId, args.startDate, args.endDate);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getTrackLogsByUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrackLogsByUser_args> {
      public getTrackLogsByUser() {
        super("getTrackLogsByUser");
      }

      protected getTrackLogsByUser_args getEmptyArgsInstance() {
        return new getTrackLogsByUser_args();
      }

      protected getTrackLogsByUser_result getResult(I iface, getTrackLogsByUser_args args) throws org.apache.thrift.TException {
        getTrackLogsByUser_result result = new getTrackLogsByUser_result();
        try {
          result.success = iface.getTrackLogsByUser(args.userId);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getTrackLogs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrackLogs_args> {
      public getTrackLogs() {
        super("getTrackLogs");
      }

      protected getTrackLogs_args getEmptyArgsInstance() {
        return new getTrackLogs_args();
      }

      protected getTrackLogs_result getResult(I iface, getTrackLogs_args args) throws org.apache.thrift.TException {
        getTrackLogs_result result = new getTrackLogs_result();
        try {
          result.success = iface.getTrackLogs(args.userId, args.event, args.url);
        } catch (UserAffiliateException utx) {
          result.utx = utx;
        }
        return result;
      }
    }

    private static class getCurrentCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentCart_args> {
      public getCurrentCart() {
        super("getCurrentCart");
      }

      protected getCurrentCart_args getEmptyArgsInstance() {
        return new getCurrentCart_args();
      }

      protected getCurrentCart_result getResult(I iface, getCurrentCart_args args) throws org.apache.thrift.TException {
        getCurrentCart_result result = new getCurrentCart_result();
        try {
          result.success = iface.getCurrentCart(args.userId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class getCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCart_args> {
      public getCart() {
        super("getCart");
      }

      protected getCart_args getEmptyArgsInstance() {
        return new getCart_args();
      }

      protected getCart_result getResult(I iface, getCart_args args) throws org.apache.thrift.TException {
        getCart_result result = new getCart_result();
        try {
          result.success = iface.getCart(args.cartId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class getCartsByTime<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCartsByTime_args> {
      public getCartsByTime() {
        super("getCartsByTime");
      }

      protected getCartsByTime_args getEmptyArgsInstance() {
        return new getCartsByTime_args();
      }

      protected getCartsByTime_result getResult(I iface, getCartsByTime_args args) throws org.apache.thrift.TException {
        getCartsByTime_result result = new getCartsByTime_result();
        try {
          result.success = iface.getCartsByTime(args.from_time, args.to_time, args.status);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class addItemToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItemToCart_args> {
      public addItemToCart() {
        super("addItemToCart");
      }

      protected addItemToCart_args getEmptyArgsInstance() {
        return new addItemToCart_args();
      }

      protected addItemToCart_result getResult(I iface, addItemToCart_args args) throws org.apache.thrift.TException {
        addItemToCart_result result = new addItemToCart_result();
        try {
          result.success = iface.addItemToCart(args.cartId, args.itemId, args.quantity, args.sourceId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class deleteItemFromCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteItemFromCart_args> {
      public deleteItemFromCart() {
        super("deleteItemFromCart");
      }

      protected deleteItemFromCart_args getEmptyArgsInstance() {
        return new deleteItemFromCart_args();
      }

      protected deleteItemFromCart_result getResult(I iface, deleteItemFromCart_args args) throws org.apache.thrift.TException {
        deleteItemFromCart_result result = new deleteItemFromCart_result();
        try {
          iface.deleteItemFromCart(args.cartId, args.itemId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class addAddressToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addAddressToCart_args> {
      public addAddressToCart() {
        super("addAddressToCart");
      }

      protected addAddressToCart_args getEmptyArgsInstance() {
        return new addAddressToCart_args();
      }

      protected addAddressToCart_result getResult(I iface, addAddressToCart_args args) throws org.apache.thrift.TException {
        addAddressToCart_result result = new addAddressToCart_result();
        try {
          iface.addAddressToCart(args.cartId, args.addressId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class addStoreToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addStoreToCart_args> {
      public addStoreToCart() {
        super("addStoreToCart");
      }

      protected addStoreToCart_args getEmptyArgsInstance() {
        return new addStoreToCart_args();
      }

      protected addStoreToCart_result getResult(I iface, addStoreToCart_args args) throws org.apache.thrift.TException {
        addStoreToCart_result result = new addStoreToCart_result();
        try {
          iface.addStoreToCart(args.cartId, args.storeId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class applyCouponToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyCouponToCart_args> {
      public applyCouponToCart() {
        super("applyCouponToCart");
      }

      protected applyCouponToCart_args getEmptyArgsInstance() {
        return new applyCouponToCart_args();
      }

      protected applyCouponToCart_result getResult(I iface, applyCouponToCart_args args) throws org.apache.thrift.TException {
        applyCouponToCart_result result = new applyCouponToCart_result();
        try {
          iface.applyCouponToCart(args.cart, args.couponCode);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class removeCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeCoupon_args> {
      public removeCoupon() {
        super("removeCoupon");
      }

      protected removeCoupon_args getEmptyArgsInstance() {
        return new removeCoupon_args();
      }

      protected removeCoupon_result getResult(I iface, removeCoupon_args args) throws org.apache.thrift.TException {
        removeCoupon_result result = new removeCoupon_result();
        try {
          iface.removeCoupon(args.cartId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class deleteDiscountsFromCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDiscountsFromCart_args> {
      public deleteDiscountsFromCart() {
        super("deleteDiscountsFromCart");
      }

      protected deleteDiscountsFromCart_args getEmptyArgsInstance() {
        return new deleteDiscountsFromCart_args();
      }

      protected deleteDiscountsFromCart_result getResult(I iface, deleteDiscountsFromCart_args args) throws org.apache.thrift.TException {
        deleteDiscountsFromCart_result result = new deleteDiscountsFromCart_result();
        try {
          iface.deleteDiscountsFromCart(args.cartId);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class saveDiscounts<I extends Iface> extends org.apache.thrift.ProcessFunction<I, saveDiscounts_args> {
      public saveDiscounts() {
        super("saveDiscounts");
      }

      protected saveDiscounts_args getEmptyArgsInstance() {
        return new saveDiscounts_args();
      }

      protected saveDiscounts_result getResult(I iface, saveDiscounts_args args) throws org.apache.thrift.TException {
        saveDiscounts_result result = new saveDiscounts_result();
        try {
          iface.saveDiscounts(args.discounts);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class createOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createOrders_args> {
      public createOrders() {
        super("createOrders");
      }

      protected createOrders_args getEmptyArgsInstance() {
        return new createOrders_args();
      }

      protected createOrders_result getResult(I iface, createOrders_args args) throws org.apache.thrift.TException {
        createOrders_result result = new createOrders_result();
        try {
          result.success = iface.createOrders(args.cartId, args.sessionSource, args.sessionStartTime, args.firstSource, args.firstSourceTime, args.userId, args.schemeId, args.orderSource, args.selfPickup);
          result.setSuccessIsSet(true);
        } catch (ShoppingCartException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class validateCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateCart_args> {
      public validateCart() {
        super("validateCart");
      }

      protected validateCart_args getEmptyArgsInstance() {
        return new validateCart_args();
      }

      protected validateCart_result getResult(I iface, validateCart_args args) throws org.apache.thrift.TException {
        validateCart_result result = new validateCart_result();
        try {
          result.success = iface.validateCart(args.cartId, args.sourceId);
        } catch (ShoppingCartException scex) {
          result.scex = scex;
        }
        return result;
      }
    }

    private static class validateCartWithDealerCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateCartWithDealerCoupon_args> {
      public validateCartWithDealerCoupon() {
        super("validateCartWithDealerCoupon");
      }

      protected validateCartWithDealerCoupon_args getEmptyArgsInstance() {
        return new validateCartWithDealerCoupon_args();
      }

      protected validateCartWithDealerCoupon_result getResult(I iface, validateCartWithDealerCoupon_args args) throws org.apache.thrift.TException {
        validateCartWithDealerCoupon_result result = new validateCartWithDealerCoupon_result();
        try {
          result.success = iface.validateCartWithDealerCoupon(args.cartId, args.sourceId, args.dealCoupon);
        } catch (ShoppingCartException scex) {
          result.scex = scex;
        }
        return result;
      }
    }

    private static class mergeCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mergeCart_args> {
      public mergeCart() {
        super("mergeCart");
      }

      protected mergeCart_args getEmptyArgsInstance() {
        return new mergeCart_args();
      }

      protected mergeCart_result getResult(I iface, mergeCart_args args) throws org.apache.thrift.TException {
        mergeCart_result result = new mergeCart_result();
        iface.mergeCart(args.fromCartId, args.toCartId);
        return result;
      }
    }

    private static class checkOut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkOut_args> {
      public checkOut() {
        super("checkOut");
      }

      protected checkOut_args getEmptyArgsInstance() {
        return new checkOut_args();
      }

      protected checkOut_result getResult(I iface, checkOut_args args) throws org.apache.thrift.TException {
        checkOut_result result = new checkOut_result();
        try {
          result.success = iface.checkOut(args.cartId);
          result.setSuccessIsSet(true);
        } catch (ShoppingCartException scex) {
          result.scex = scex;
        }
        return result;
      }
    }

    private static class resetCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetCart_args> {
      public resetCart() {
        super("resetCart");
      }

      protected resetCart_args getEmptyArgsInstance() {
        return new resetCart_args();
      }

      protected resetCart_result getResult(I iface, resetCart_args args) throws org.apache.thrift.TException {
        resetCart_result result = new resetCart_result();
        try {
          result.success = iface.resetCart(args.cartId, args.items);
          result.setSuccessIsSet(true);
        } catch (ShoppingCartException scex) {
          result.scex = scex;
        }
        return result;
      }
    }

    private static class getUserCount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserCount_args> {
      public getUserCount() {
        super("getUserCount");
      }

      protected getUserCount_args getEmptyArgsInstance() {
        return new getUserCount_args();
      }

      protected getUserCount_result getResult(I iface, getUserCount_args args) throws org.apache.thrift.TException {
        getUserCount_result result = new getUserCount_result();
        result.success = iface.getUserCount(args.userType);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getAllUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUsers_args> {
      public getAllUsers() {
        super("getAllUsers");
      }

      protected getAllUsers_args getEmptyArgsInstance() {
        return new getAllUsers_args();
      }

      protected getAllUsers_result getResult(I iface, getAllUsers_args args) throws org.apache.thrift.TException {
        getAllUsers_result result = new getAllUsers_result();
        result.success = iface.getAllUsers(args.userType, args.startDate, args.endDate);
        return result;
      }
    }

    private static class getMyResearchItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMyResearchItems_args> {
      public getMyResearchItems() {
        super("getMyResearchItems");
      }

      protected getMyResearchItems_args getEmptyArgsInstance() {
        return new getMyResearchItems_args();
      }

      protected getMyResearchItems_result getResult(I iface, getMyResearchItems_args args) throws org.apache.thrift.TException {
        getMyResearchItems_result result = new getMyResearchItems_result();
        try {
          result.success = iface.getMyResearchItems(args.userId);
        } catch (WidgetException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class updateMyResearch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateMyResearch_args> {
      public updateMyResearch() {
        super("updateMyResearch");
      }

      protected updateMyResearch_args getEmptyArgsInstance() {
        return new updateMyResearch_args();
      }

      protected updateMyResearch_result getResult(I iface, updateMyResearch_args args) throws org.apache.thrift.TException {
        updateMyResearch_result result = new updateMyResearch_result();
        try {
          result.success = iface.updateMyResearch(args.userId, args.itemId);
          result.setSuccessIsSet(true);
        } catch (WidgetException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class deleteItemFromMyResearch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteItemFromMyResearch_args> {
      public deleteItemFromMyResearch() {
        super("deleteItemFromMyResearch");
      }

      protected deleteItemFromMyResearch_args getEmptyArgsInstance() {
        return new deleteItemFromMyResearch_args();
      }

      protected deleteItemFromMyResearch_result getResult(I iface, deleteItemFromMyResearch_args args) throws org.apache.thrift.TException {
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
        try {
          iface.deleteItemFromMyResearch(args.userId, args.itemId);
        } catch (WidgetException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class getBrowseHistoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBrowseHistoryItems_args> {
      public getBrowseHistoryItems() {
        super("getBrowseHistoryItems");
      }

      protected getBrowseHistoryItems_args getEmptyArgsInstance() {
        return new getBrowseHistoryItems_args();
      }

      protected getBrowseHistoryItems_result getResult(I iface, getBrowseHistoryItems_args args) throws org.apache.thrift.TException {
        getBrowseHistoryItems_result result = new getBrowseHistoryItems_result();
        try {
          result.success = iface.getBrowseHistoryItems(args.userId);
        } catch (WidgetException scx) {
          result.scx = scx;
        }
        return result;
      }
    }

    private static class updateBrowseHistory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateBrowseHistory_args> {
      public updateBrowseHistory() {
        super("updateBrowseHistory");
      }

      protected updateBrowseHistory_args getEmptyArgsInstance() {
        return new updateBrowseHistory_args();
      }

      protected updateBrowseHistory_result getResult(I iface, updateBrowseHistory_args args) throws org.apache.thrift.TException {
        updateBrowseHistory_result result = new updateBrowseHistory_result();
        iface.updateBrowseHistory(args.userId, args.itemId);
        return result;
      }
    }

    private static class getCartsWithCouponCount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCartsWithCouponCount_args> {
      public getCartsWithCouponCount() {
        super("getCartsWithCouponCount");
      }

      protected getCartsWithCouponCount_args getEmptyArgsInstance() {
        return new getCartsWithCouponCount_args();
      }

      protected getCartsWithCouponCount_result getResult(I iface, getCartsWithCouponCount_args args) throws org.apache.thrift.TException {
        getCartsWithCouponCount_result result = new getCartsWithCouponCount_result();
        result.success = iface.getCartsWithCouponCount(args.couponCode);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class increaseTrustLevel<I extends Iface> extends org.apache.thrift.ProcessFunction<I, increaseTrustLevel_args> {
      public increaseTrustLevel() {
        super("increaseTrustLevel");
      }

      protected increaseTrustLevel_args getEmptyArgsInstance() {
        return new increaseTrustLevel_args();
      }

      protected org.apache.thrift.TBase getResult(I iface, increaseTrustLevel_args args) throws org.apache.thrift.TException {
        iface.increaseTrustLevel(args.userId, args.trustLevelDelta);
        return null;
      }
    }

    private static class getTrustLevel<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTrustLevel_args> {
      public getTrustLevel() {
        super("getTrustLevel");
      }

      protected getTrustLevel_args getEmptyArgsInstance() {
        return new getTrustLevel_args();
      }

      protected getTrustLevel_result getResult(I iface, getTrustLevel_args args) throws org.apache.thrift.TException {
        getTrustLevel_result result = new getTrustLevel_result();
        result.success = iface.getTrustLevel(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class showCODOption<I extends Iface> extends org.apache.thrift.ProcessFunction<I, showCODOption_args> {
      public showCODOption() {
        super("showCODOption");
      }

      protected showCODOption_args getEmptyArgsInstance() {
        return new showCODOption_args();
      }

      protected showCODOption_result getResult(I iface, showCODOption_args args) throws org.apache.thrift.TException {
        showCODOption_result result = new showCODOption_result();
        result.success = iface.showCODOption(args.cartId, args.sourceId, args.pincode);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getUserEmails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserEmails_args> {
      public getUserEmails() {
        super("getUserEmails");
      }

      protected getUserEmails_args getEmptyArgsInstance() {
        return new getUserEmails_args();
      }

      protected getUserEmails_result getResult(I iface, getUserEmails_args args) throws org.apache.thrift.TException {
        getUserEmails_result result = new getUserEmails_result();
        result.success = iface.getUserEmails(args.startDate, args.endDate);
        return result;
      }
    }

    private static class insureItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insureItem_args> {
      public insureItem() {
        super("insureItem");
      }

      protected insureItem_args getEmptyArgsInstance() {
        return new insureItem_args();
      }

      protected insureItem_result getResult(I iface, insureItem_args args) throws org.apache.thrift.TException {
        insureItem_result result = new insureItem_result();
        result.success = iface.insureItem(args.itemId, args.cartId, args.toInsure, args.insurerType);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class cancelInsurance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelInsurance_args> {
      public cancelInsurance() {
        super("cancelInsurance");
      }

      protected cancelInsurance_args getEmptyArgsInstance() {
        return new cancelInsurance_args();
      }

      protected cancelInsurance_result getResult(I iface, cancelInsurance_args args) throws org.apache.thrift.TException {
        cancelInsurance_result result = new cancelInsurance_result();
        result.success = iface.cancelInsurance(args.cartId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class storeInsuranceSpecificDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, storeInsuranceSpecificDetails_args> {
      public storeInsuranceSpecificDetails() {
        super("storeInsuranceSpecificDetails");
      }

      protected storeInsuranceSpecificDetails_args getEmptyArgsInstance() {
        return new storeInsuranceSpecificDetails_args();
      }

      protected storeInsuranceSpecificDetails_result getResult(I iface, storeInsuranceSpecificDetails_args args) throws org.apache.thrift.TException {
        storeInsuranceSpecificDetails_result result = new storeInsuranceSpecificDetails_result();
        result.success = iface.storeInsuranceSpecificDetails(args.addressId, args.dob, args.guardianName);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class isInsuranceDetailPresent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isInsuranceDetailPresent_args> {
      public isInsuranceDetailPresent() {
        super("isInsuranceDetailPresent");
      }

      protected isInsuranceDetailPresent_args getEmptyArgsInstance() {
        return new isInsuranceDetailPresent_args();
      }

      protected isInsuranceDetailPresent_result getResult(I iface, isInsuranceDetailPresent_args args) throws org.apache.thrift.TException {
        isInsuranceDetailPresent_result result = new isInsuranceDetailPresent_result();
        result.success = iface.isInsuranceDetailPresent(args.addressId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getProductsAddedToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getProductsAddedToCart_args> {
      public getProductsAddedToCart() {
        super("getProductsAddedToCart");
      }

      protected getProductsAddedToCart_args getEmptyArgsInstance() {
        return new getProductsAddedToCart_args();
      }

      protected getProductsAddedToCart_result getResult(I iface, getProductsAddedToCart_args args) throws org.apache.thrift.TException {
        getProductsAddedToCart_result result = new getProductsAddedToCart_result();
        result.success = iface.getProductsAddedToCart(args.startDate, args.endDate);
        return result;
      }
    }

    private static class validateCartPlus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateCartPlus_args> {
      public validateCartPlus() {
        super("validateCartPlus");
      }

      protected validateCartPlus_args getEmptyArgsInstance() {
        return new validateCartPlus_args();
      }

      protected validateCartPlus_result getResult(I iface, validateCartPlus_args args) throws org.apache.thrift.TException {
        validateCartPlus_result result = new validateCartPlus_result();
        try {
          result.success = iface.validateCartPlus(args.cartId, args.sourceId, args.dealerCoupon);
        } catch (ShoppingCartException scex) {
          result.scex = scex;
        }
        return result;
      }
    }

    private static class isPrivateDealUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isPrivateDealUser_args> {
      public isPrivateDealUser() {
        super("isPrivateDealUser");
      }

      protected isPrivateDealUser_args getEmptyArgsInstance() {
        return new isPrivateDealUser_args();
      }

      protected isPrivateDealUser_result getResult(I iface, isPrivateDealUser_args args) throws org.apache.thrift.TException {
        isPrivateDealUser_result result = new isPrivateDealUser_result();
        result.success = iface.isPrivateDealUser(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class addPrivateDealUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addPrivateDealUser_args> {
      public addPrivateDealUser() {
        super("addPrivateDealUser");
      }

      protected addPrivateDealUser_args getEmptyArgsInstance() {
        return new addPrivateDealUser_args();
      }

      protected addPrivateDealUser_result getResult(I iface, addPrivateDealUser_args args) throws org.apache.thrift.TException {
        addPrivateDealUser_result result = new addPrivateDealUser_result();
        result.success = iface.addPrivateDealUser(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class changePrivateDealUserStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changePrivateDealUserStatus_args> {
      public changePrivateDealUserStatus() {
        super("changePrivateDealUserStatus");
      }

      protected changePrivateDealUserStatus_args getEmptyArgsInstance() {
        return new changePrivateDealUserStatus_args();
      }

      protected changePrivateDealUserStatus_result getResult(I iface, changePrivateDealUserStatus_args args) throws org.apache.thrift.TException {
        changePrivateDealUserStatus_result result = new changePrivateDealUserStatus_result();
        result.success = iface.changePrivateDealUserStatus(args.userId, args.isActive);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getPrivateDealUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrivateDealUser_args> {
      public getPrivateDealUser() {
        super("getPrivateDealUser");
      }

      protected getPrivateDealUser_args getEmptyArgsInstance() {
        return new getPrivateDealUser_args();
      }

      protected getPrivateDealUser_result getResult(I iface, getPrivateDealUser_args args) throws org.apache.thrift.TException {
        getPrivateDealUser_result result = new getPrivateDealUser_result();
        result.success = iface.getPrivateDealUser(args.userId);
        return result;
      }
    }

    private static class registerCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerCounter_args> {
      public registerCounter() {
        super("registerCounter");
      }

      protected registerCounter_args getEmptyArgsInstance() {
        return new registerCounter_args();
      }

      protected registerCounter_result getResult(I iface, registerCounter_args args) throws org.apache.thrift.TException {
        registerCounter_result result = new registerCounter_result();
        result.success = iface.registerCounter(args.counter, args.userId);
        return result;
      }
    }

    private static class searchCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, searchCounter_args> {
      public searchCounter() {
        super("searchCounter");
      }

      protected searchCounter_args getEmptyArgsInstance() {
        return new searchCounter_args();
      }

      protected searchCounter_result getResult(I iface, searchCounter_args args) throws org.apache.thrift.TException {
        searchCounter_result result = new searchCounter_result();
        result.success = iface.searchCounter(args.type1, args.searchString);
        return result;
      }
    }

    private static class getCounterByUserId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCounterByUserId_args> {
      public getCounterByUserId() {
        super("getCounterByUserId");
      }

      protected getCounterByUserId_args getEmptyArgsInstance() {
        return new getCounterByUserId_args();
      }

      protected getCounterByUserId_result getResult(I iface, getCounterByUserId_args args) throws org.apache.thrift.TException {
        getCounterByUserId_result result = new getCounterByUserId_result();
        result.success = iface.getCounterByUserId(args.userId);
        return result;
      }
    }

    private static class getAllUsersByCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUsersByCounter_args> {
      public getAllUsersByCounter() {
        super("getAllUsersByCounter");
      }

      protected getAllUsersByCounter_args getEmptyArgsInstance() {
        return new getAllUsersByCounter_args();
      }

      protected getAllUsersByCounter_result getResult(I iface, getAllUsersByCounter_args args) throws org.apache.thrift.TException {
        getAllUsersByCounter_result result = new getAllUsersByCounter_result();
        result.success = iface.getAllUsersByCounter(args.counterId);
        return result;
      }
    }

    private static class getActiveAccessTokenForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveAccessTokenForUser_args> {
      public getActiveAccessTokenForUser() {
        super("getActiveAccessTokenForUser");
      }

      protected getActiveAccessTokenForUser_args getEmptyArgsInstance() {
        return new getActiveAccessTokenForUser_args();
      }

      protected getActiveAccessTokenForUser_result getResult(I iface, getActiveAccessTokenForUser_args args) throws org.apache.thrift.TException {
        getActiveAccessTokenForUser_result result = new getActiveAccessTokenForUser_result();
        result.success = iface.getActiveAccessTokenForUser(args.userId, args.source);
        return result;
      }
    }

    private static class validateAccessToken<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateAccessToken_args> {
      public validateAccessToken() {
        super("validateAccessToken");
      }

      protected validateAccessToken_args getEmptyArgsInstance() {
        return new validateAccessToken_args();
      }

      protected validateAccessToken_result getResult(I iface, validateAccessToken_args args) throws org.apache.thrift.TException {
        validateAccessToken_result result = new validateAccessToken_result();
        result.success = iface.validateAccessToken(args.accessToken);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class addItemsToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItemsToCart_args> {
      public addItemsToCart() {
        super("addItemsToCart");
      }

      protected addItemsToCart_args getEmptyArgsInstance() {
        return new addItemsToCart_args();
      }

      protected addItemsToCart_result getResult(I iface, addItemsToCart_args args) throws org.apache.thrift.TException {
        addItemsToCart_result result = new addItemsToCart_result();
        result.success = iface.addItemsToCart(args.cartId, args.itemQty, args.couponCode);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class validateCartNew<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateCartNew_args> {
      public validateCartNew() {
        super("validateCartNew");
      }

      protected validateCartNew_args getEmptyArgsInstance() {
        return new validateCartNew_args();
      }

      protected validateCartNew_result getResult(I iface, validateCartNew_args args) throws org.apache.thrift.TException {
        validateCartNew_result result = new validateCartNew_result();
        result.success = iface.validateCartNew(args.cartId, args.pinCode, args.sourceId);
        return result;
      }
    }

    private static class isAddressEditableForCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isAddressEditableForCounter_args> {
      public isAddressEditableForCounter() {
        super("isAddressEditableForCounter");
      }

      protected isAddressEditableForCounter_args getEmptyArgsInstance() {
        return new isAddressEditableForCounter_args();
      }

      protected isAddressEditableForCounter_result getResult(I iface, isAddressEditableForCounter_args args) throws org.apache.thrift.TException {
        isAddressEditableForCounter_result result = new isAddressEditableForCounter_result();
        result.success = iface.isAddressEditableForCounter(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getBillingAddressForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBillingAddressForUser_args> {
      public getBillingAddressForUser() {
        super("getBillingAddressForUser");
      }

      protected getBillingAddressForUser_args getEmptyArgsInstance() {
        return new getBillingAddressForUser_args();
      }

      protected getBillingAddressForUser_result getResult(I iface, getBillingAddressForUser_args args) throws org.apache.thrift.TException {
        getBillingAddressForUser_result result = new getBillingAddressForUser_result();
        result.success = iface.getBillingAddressForUser(args.userId);
        return result;
      }
    }

    private static class isCreditorAssigned<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isCreditorAssigned_args> {
      public isCreditorAssigned() {
        super("isCreditorAssigned");
      }

      protected isCreditorAssigned_args getEmptyArgsInstance() {
        return new isCreditorAssigned_args();
      }

      protected isCreditorAssigned_result getResult(I iface, isCreditorAssigned_args args) throws org.apache.thrift.TException {
        isCreditorAssigned_result result = new isCreditorAssigned_result();
        result.success = iface.isCreditorAssigned(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class isTaxInvoiceEnabledUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isTaxInvoiceEnabledUser_args> {
      public isTaxInvoiceEnabledUser() {
        super("isTaxInvoiceEnabledUser");
      }

      protected isTaxInvoiceEnabledUser_args getEmptyArgsInstance() {
        return new isTaxInvoiceEnabledUser_args();
      }

      protected isTaxInvoiceEnabledUser_result getResult(I iface, isTaxInvoiceEnabledUser_args args) throws org.apache.thrift.TException {
        isTaxInvoiceEnabledUser_result result = new isTaxInvoiceEnabledUser_result();
        result.success = iface.isTaxInvoiceEnabledUser(args.userId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class taxInvoiceAvailable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, taxInvoiceAvailable_args> {
      public taxInvoiceAvailable() {
        super("taxInvoiceAvailable");
      }

      protected taxInvoiceAvailable_args getEmptyArgsInstance() {
        return new taxInvoiceAvailable_args();
      }

      protected taxInvoiceAvailable_result getResult(I iface, taxInvoiceAvailable_args args) throws org.apache.thrift.TException {
        taxInvoiceAvailable_result result = new taxInvoiceAvailable_result();
        result.success = iface.taxInvoiceAvailable(args.addressId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getCartByValue<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCartByValue_args> {
      public getCartByValue() {
        super("getCartByValue");
      }

      protected getCartByValue_args getEmptyArgsInstance() {
        return new getCartByValue_args();
      }

      protected getCartByValue_result getResult(I iface, getCartByValue_args args) throws org.apache.thrift.TException {
        getCartByValue_result result = new getCartByValue_result();
        result.success = iface.getCartByValue(args.cartIds);
        return result;
      }
    }

    private static class getCounterName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCounterName_args> {
      public getCounterName() {
        super("getCounterName");
      }

      protected getCounterName_args getEmptyArgsInstance() {
        return new getCounterName_args();
      }

      protected getCounterName_result getResult(I iface, getCounterName_args args) throws org.apache.thrift.TException {
        getCounterName_result result = new getCounterName_result();
        result.success = iface.getCounterName(args.userIds);
        return result;
      }
    }

    private static class setWalletAmountInCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setWalletAmountInCart_args> {
      public setWalletAmountInCart() {
        super("setWalletAmountInCart");
      }

      protected setWalletAmountInCart_args getEmptyArgsInstance() {
        return new setWalletAmountInCart_args();
      }

      protected setWalletAmountInCart_result getResult(I iface, setWalletAmountInCart_args args) throws org.apache.thrift.TException {
        setWalletAmountInCart_result result = new setWalletAmountInCart_result();
        result.success = iface.setWalletAmountInCart(args.cartId, args.wallet_amount);
        result.setSuccessIsSet(true);
        return result;
      }
    }

  }

  public static class createAnonymousUser_args implements org.apache.thrift.TBase<createAnonymousUser_args, createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAnonymousUser_args");

    private static final org.apache.thrift.protocol.TField JSESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jsessionId", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String jsessionId; // 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 {
      JSESSION_ID((short)1, "jsessionId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // JSESSION_ID
            return JSESSION_ID;
          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.JSESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("jsessionId", 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(createAnonymousUser_args.class, metaDataMap);
    }

    public createAnonymousUser_args() {
    }

    public createAnonymousUser_args(
      String jsessionId)
    {
      this();
      this.jsessionId = jsessionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createAnonymousUser_args(createAnonymousUser_args other) {
      if (other.isSetJsessionId()) {
        this.jsessionId = other.jsessionId;
      }
    }

    public createAnonymousUser_args deepCopy() {
      return new createAnonymousUser_args(this);
    }

    @Override
    public void clear() {
      this.jsessionId = null;
    }

    public String getJsessionId() {
      return this.jsessionId;
    }

    public void setJsessionId(String jsessionId) {
      this.jsessionId = jsessionId;
    }

    public void unsetJsessionId() {
      this.jsessionId = null;
    }

    /** Returns true if field jsessionId is set (has been assigned a value) and false otherwise */
    public boolean isSetJsessionId() {
      return this.jsessionId != null;
    }

    public void setJsessionIdIsSet(boolean value) {
      if (!value) {
        this.jsessionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case JSESSION_ID:
        if (value == null) {
          unsetJsessionId();
        } else {
          setJsessionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case JSESSION_ID:
        return getJsessionId();

      }
      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 JSESSION_ID:
        return isSetJsessionId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createAnonymousUser_args)
        return this.equals((createAnonymousUser_args)that);
      return false;
    }

    public boolean equals(createAnonymousUser_args that) {
      if (that == null)
        return false;

      boolean this_present_jsessionId = true && this.isSetJsessionId();
      boolean that_present_jsessionId = true && that.isSetJsessionId();
      if (this_present_jsessionId || that_present_jsessionId) {
        if (!(this_present_jsessionId && that_present_jsessionId))
          return false;
        if (!this.jsessionId.equals(that.jsessionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createAnonymousUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;

      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(typedOther.isSetJsessionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetJsessionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jsessionId, typedOther.jsessionId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // JSESSION_ID
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.jsessionId = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.jsessionId != null) {
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
        oprot.writeString(this.jsessionId);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
      boolean first = true;

      sb.append("jsessionId:");
      if (this.jsessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.jsessionId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createAnonymousUser_result implements org.apache.thrift.TBase<createAnonymousUser_result, createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAnonymousUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
    }

    public createAnonymousUser_result() {
    }

    public createAnonymousUser_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createAnonymousUser_result(createAnonymousUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public createAnonymousUser_result deepCopy() {
      return new createAnonymousUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createAnonymousUser_result)
        return this.equals((createAnonymousUser_result)that);
      return false;
    }

    public boolean equals(createAnonymousUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createAnonymousUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserById_args implements org.apache.thrift.TBase<getUserById_args, getUserById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserById_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
    }

    public getUserById_args() {
    }

    public getUserById_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserById_args(getUserById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getUserById_args deepCopy() {
      return new getUserById_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserById_args)
        return this.equals((getUserById_args)that);
      return false;
    }

    public boolean equals(getUserById_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserById_args typedOther = (getUserById_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserById_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserById_result implements org.apache.thrift.TBase<getUserById_result, getUserById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
    }

    public getUserById_result() {
    }

    public getUserById_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserById_result(getUserById_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public getUserById_result deepCopy() {
      return new getUserById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserById_result)
        return this.equals((getUserById_result)that);
      return false;
    }

    public boolean equals(getUserById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserById_result typedOther = (getUserById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByCartId_args implements org.apache.thrift.TBase<getUserByCartId_args, getUserByCartId_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByCartId_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserByCartId_args.class, metaDataMap);
    }

    public getUserByCartId_args() {
    }

    public getUserByCartId_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByCartId_args(getUserByCartId_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public getUserByCartId_args deepCopy() {
      return new getUserByCartId_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByCartId_args)
        return this.equals((getUserByCartId_args)that);
      return false;
    }

    public boolean equals(getUserByCartId_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByCartId_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByCartId_args typedOther = (getUserByCartId_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByCartId_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByCartId_result implements org.apache.thrift.TBase<getUserByCartId_result, getUserByCartId_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByCartId_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserByCartId_result.class, metaDataMap);
    }

    public getUserByCartId_result() {
    }

    public getUserByCartId_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByCartId_result(getUserByCartId_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public getUserByCartId_result deepCopy() {
      return new getUserByCartId_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByCartId_result)
        return this.equals((getUserByCartId_result)that);
      return false;
    }

    public boolean equals(getUserByCartId_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByCartId_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByCartId_result typedOther = (getUserByCartId_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByCartId_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByEmail_args implements org.apache.thrift.TBase<getUserByEmail_args, getUserByEmail_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByEmail_args");

    private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String email; // 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 {
      EMAIL((short)1, "email");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EMAIL
            return EMAIL;
          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.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", 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(getUserByEmail_args.class, metaDataMap);
    }

    public getUserByEmail_args() {
    }

    public getUserByEmail_args(
      String email)
    {
      this();
      this.email = email;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByEmail_args(getUserByEmail_args other) {
      if (other.isSetEmail()) {
        this.email = other.email;
      }
    }

    public getUserByEmail_args deepCopy() {
      return new getUserByEmail_args(this);
    }

    @Override
    public void clear() {
      this.email = null;
    }

    public String getEmail() {
      return this.email;
    }

    public void setEmail(String email) {
      this.email = email;
    }

    public void unsetEmail() {
      this.email = null;
    }

    /** Returns true if field email is set (has been assigned a value) and false otherwise */
    public boolean isSetEmail() {
      return this.email != null;
    }

    public void setEmailIsSet(boolean value) {
      if (!value) {
        this.email = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EMAIL:
        if (value == null) {
          unsetEmail();
        } else {
          setEmail((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EMAIL:
        return getEmail();

      }
      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 EMAIL:
        return isSetEmail();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByEmail_args)
        return this.equals((getUserByEmail_args)that);
      return false;
    }

    public boolean equals(getUserByEmail_args that) {
      if (that == null)
        return false;

      boolean this_present_email = true && this.isSetEmail();
      boolean that_present_email = true && that.isSetEmail();
      if (this_present_email || that_present_email) {
        if (!(this_present_email && that_present_email))
          return false;
        if (!this.email.equals(that.email))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByEmail_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByEmail_args typedOther = (getUserByEmail_args)other;

      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEmail()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // EMAIL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.email = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.email != null) {
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
        oprot.writeString(this.email);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByEmail_args(");
      boolean first = true;

      sb.append("email:");
      if (this.email == null) {
        sb.append("null");
      } else {
        sb.append(this.email);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByEmail_result implements org.apache.thrift.TBase<getUserByEmail_result, getUserByEmail_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByEmail_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserByEmail_result.class, metaDataMap);
    }

    public getUserByEmail_result() {
    }

    public getUserByEmail_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByEmail_result(getUserByEmail_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public getUserByEmail_result deepCopy() {
      return new getUserByEmail_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByEmail_result)
        return this.equals((getUserByEmail_result)that);
      return false;
    }

    public boolean equals(getUserByEmail_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByEmail_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByEmail_result typedOther = (getUserByEmail_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByEmail_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByMobileNumber_args implements org.apache.thrift.TBase<getUserByMobileNumber_args, getUserByMobileNumber_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByMobileNumber_args");

    private static final org.apache.thrift.protocol.TField MOBILE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("mobileNumber", org.apache.thrift.protocol.TType.I64, (short)1);

    private long mobileNumber; // 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 {
      MOBILE_NUMBER((short)1, "mobileNumber");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MOBILE_NUMBER
            return MOBILE_NUMBER;
          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 __MOBILENUMBER_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MOBILE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("mobileNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserByMobileNumber_args.class, metaDataMap);
    }

    public getUserByMobileNumber_args() {
    }

    public getUserByMobileNumber_args(
      long mobileNumber)
    {
      this();
      this.mobileNumber = mobileNumber;
      setMobileNumberIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByMobileNumber_args(getUserByMobileNumber_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.mobileNumber = other.mobileNumber;
    }

    public getUserByMobileNumber_args deepCopy() {
      return new getUserByMobileNumber_args(this);
    }

    @Override
    public void clear() {
      setMobileNumberIsSet(false);
      this.mobileNumber = 0;
    }

    public long getMobileNumber() {
      return this.mobileNumber;
    }

    public void setMobileNumber(long mobileNumber) {
      this.mobileNumber = mobileNumber;
      setMobileNumberIsSet(true);
    }

    public void unsetMobileNumber() {
      __isset_bit_vector.clear(__MOBILENUMBER_ISSET_ID);
    }

    /** Returns true if field mobileNumber is set (has been assigned a value) and false otherwise */
    public boolean isSetMobileNumber() {
      return __isset_bit_vector.get(__MOBILENUMBER_ISSET_ID);
    }

    public void setMobileNumberIsSet(boolean value) {
      __isset_bit_vector.set(__MOBILENUMBER_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case MOBILE_NUMBER:
        if (value == null) {
          unsetMobileNumber();
        } else {
          setMobileNumber((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case MOBILE_NUMBER:
        return Long.valueOf(getMobileNumber());

      }
      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 MOBILE_NUMBER:
        return isSetMobileNumber();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByMobileNumber_args)
        return this.equals((getUserByMobileNumber_args)that);
      return false;
    }

    public boolean equals(getUserByMobileNumber_args that) {
      if (that == null)
        return false;

      boolean this_present_mobileNumber = true;
      boolean that_present_mobileNumber = true;
      if (this_present_mobileNumber || that_present_mobileNumber) {
        if (!(this_present_mobileNumber && that_present_mobileNumber))
          return false;
        if (this.mobileNumber != that.mobileNumber)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByMobileNumber_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByMobileNumber_args typedOther = (getUserByMobileNumber_args)other;

      lastComparison = Boolean.valueOf(isSetMobileNumber()).compareTo(typedOther.isSetMobileNumber());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMobileNumber()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mobileNumber, typedOther.mobileNumber);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // MOBILE_NUMBER
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.mobileNumber = iprot.readI64();
              setMobileNumberIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(MOBILE_NUMBER_FIELD_DESC);
      oprot.writeI64(this.mobileNumber);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByMobileNumber_args(");
      boolean first = true;

      sb.append("mobileNumber:");
      sb.append(this.mobileNumber);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserByMobileNumber_result implements org.apache.thrift.TBase<getUserByMobileNumber_result, getUserByMobileNumber_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserByMobileNumber_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserByMobileNumber_result.class, metaDataMap);
    }

    public getUserByMobileNumber_result() {
    }

    public getUserByMobileNumber_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserByMobileNumber_result(getUserByMobileNumber_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public getUserByMobileNumber_result deepCopy() {
      return new getUserByMobileNumber_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserByMobileNumber_result)
        return this.equals((getUserByMobileNumber_result)that);
      return false;
    }

    public boolean equals(getUserByMobileNumber_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserByMobileNumber_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserByMobileNumber_result typedOther = (getUserByMobileNumber_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserByMobileNumber_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createUser_args implements org.apache.thrift.TBase<createUser_args, createUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_args");

    private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User user; // 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 {
      USER((short)1, "user");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER
            return USER;
          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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, User.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
    }

    public createUser_args() {
    }

    public createUser_args(
      User user)
    {
      this();
      this.user = user;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createUser_args(createUser_args other) {
      if (other.isSetUser()) {
        this.user = new User(other.user);
      }
    }

    public createUser_args deepCopy() {
      return new createUser_args(this);
    }

    @Override
    public void clear() {
      this.user = null;
    }

    public User getUser() {
      return this.user;
    }

    public void setUser(User user) {
      this.user = user;
    }

    public void unsetUser() {
      this.user = null;
    }

    /** Returns true if field user is set (has been assigned a value) and false otherwise */
    public boolean isSetUser() {
      return this.user != null;
    }

    public void setUserIsSet(boolean value) {
      if (!value) {
        this.user = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER:
        if (value == null) {
          unsetUser();
        } else {
          setUser((User)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER:
        return getUser();

      }
      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 USER:
        return isSetUser();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createUser_args)
        return this.equals((createUser_args)that);
      return false;
    }

    public boolean equals(createUser_args that) {
      if (that == null)
        return false;

      boolean this_present_user = true && this.isSetUser();
      boolean that_present_user = true && that.isSetUser();
      if (this_present_user || that_present_user) {
        if (!(this_present_user && that_present_user))
          return false;
        if (!this.user.equals(that.user))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createUser_args typedOther = (createUser_args)other;

      lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUser()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.user = new User();
              this.user.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        this.user.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createUser_args(");
      boolean first = true;

      sb.append("user:");
      if (this.user == null) {
        sb.append("null");
      } else {
        sb.append(this.user);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createUser_result implements org.apache.thrift.TBase<createUser_result, createUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
    }

    public createUser_result() {
    }

    public createUser_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createUser_result(createUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public createUser_result deepCopy() {
      return new createUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createUser_result)
        return this.equals((createUser_result)that);
      return false;
    }

    public boolean equals(createUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createUser_result typedOther = (createUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateUser_args implements org.apache.thrift.TBase<updateUser_args, updateUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUser_args");

    private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User user; // 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 {
      USER((short)1, "user");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER
            return USER;
          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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, User.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
    }

    public updateUser_args() {
    }

    public updateUser_args(
      User user)
    {
      this();
      this.user = user;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateUser_args(updateUser_args other) {
      if (other.isSetUser()) {
        this.user = new User(other.user);
      }
    }

    public updateUser_args deepCopy() {
      return new updateUser_args(this);
    }

    @Override
    public void clear() {
      this.user = null;
    }

    public User getUser() {
      return this.user;
    }

    public void setUser(User user) {
      this.user = user;
    }

    public void unsetUser() {
      this.user = null;
    }

    /** Returns true if field user is set (has been assigned a value) and false otherwise */
    public boolean isSetUser() {
      return this.user != null;
    }

    public void setUserIsSet(boolean value) {
      if (!value) {
        this.user = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER:
        if (value == null) {
          unsetUser();
        } else {
          setUser((User)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER:
        return getUser();

      }
      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 USER:
        return isSetUser();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateUser_args)
        return this.equals((updateUser_args)that);
      return false;
    }

    public boolean equals(updateUser_args that) {
      if (that == null)
        return false;

      boolean this_present_user = true && this.isSetUser();
      boolean that_present_user = true && that.isSetUser();
      if (this_present_user || that_present_user) {
        if (!(this_present_user && that_present_user))
          return false;
        if (!this.user.equals(that.user))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateUser_args typedOther = (updateUser_args)other;

      lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUser()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.user = new User();
              this.user.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        this.user.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateUser_args(");
      boolean first = true;

      sb.append("user:");
      if (this.user == null) {
        sb.append("null");
      } else {
        sb.append(this.user);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateUser_result implements org.apache.thrift.TBase<updateUser_result, updateUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private UserContextException ucex; // 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"),
      UCEX((short)1, "ucex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCEX
            return UCEX;
          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, User.class)));
      tmpMap.put(_Fields.UCEX, new org.apache.thrift.meta_data.FieldMetaData("ucex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
    }

    public updateUser_result() {
    }

    public updateUser_result(
      User success,
      UserContextException ucex)
    {
      this();
      this.success = success;
      this.ucex = ucex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateUser_result(updateUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetUcex()) {
        this.ucex = new UserContextException(other.ucex);
      }
    }

    public updateUser_result deepCopy() {
      return new updateUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 UserContextException getUcex() {
      return this.ucex;
    }

    public void setUcex(UserContextException ucex) {
      this.ucex = ucex;
    }

    public void unsetUcex() {
      this.ucex = null;
    }

    /** Returns true if field ucex is set (has been assigned a value) and false otherwise */
    public boolean isSetUcex() {
      return this.ucex != null;
    }

    public void setUcexIsSet(boolean value) {
      if (!value) {
        this.ucex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case UCEX:
        if (value == null) {
          unsetUcex();
        } else {
          setUcex((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCEX:
        return getUcex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCEX:
        return isSetUcex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateUser_result)
        return this.equals((updateUser_result)that);
      return false;
    }

    public boolean equals(updateUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucex = true && this.isSetUcex();
      boolean that_present_ucex = true && that.isSetUcex();
      if (this_present_ucex || that_present_ucex) {
        if (!(this_present_ucex && that_present_ucex))
          return false;
        if (!this.ucex.equals(that.ucex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateUser_result typedOther = (updateUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(typedOther.isSetUcex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucex, typedOther.ucex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucex = new UserContextException();
              this.ucex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcex()) {
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
        this.ucex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucex:");
      if (this.ucex == null) {
        sb.append("null");
      } else {
        sb.append(this.ucex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class authenticateUser_args implements org.apache.thrift.TBase<authenticateUser_args, authenticateUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticateUser_args");

    private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", 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 String email; // required
    private 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 {
      EMAIL((short)1, "email"),
      PASSWORD((short)2, "password");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EMAIL
            return EMAIL;
          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.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", 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(authenticateUser_args.class, metaDataMap);
    }

    public authenticateUser_args() {
    }

    public authenticateUser_args(
      String email,
      String password)
    {
      this();
      this.email = email;
      this.password = password;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticateUser_args(authenticateUser_args other) {
      if (other.isSetEmail()) {
        this.email = other.email;
      }
      if (other.isSetPassword()) {
        this.password = other.password;
      }
    }

    public authenticateUser_args deepCopy() {
      return new authenticateUser_args(this);
    }

    @Override
    public void clear() {
      this.email = null;
      this.password = null;
    }

    public String getEmail() {
      return this.email;
    }

    public void setEmail(String email) {
      this.email = email;
    }

    public void unsetEmail() {
      this.email = null;
    }

    /** Returns true if field email is set (has been assigned a value) and false otherwise */
    public boolean isSetEmail() {
      return this.email != null;
    }

    public void setEmailIsSet(boolean value) {
      if (!value) {
        this.email = null;
      }
    }

    public String getPassword() {
      return this.password;
    }

    public void setPassword(String password) {
      this.password = password;
    }

    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 EMAIL:
        if (value == null) {
          unsetEmail();
        } else {
          setEmail((String)value);
        }
        break;

      case PASSWORD:
        if (value == null) {
          unsetPassword();
        } else {
          setPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EMAIL:
        return getEmail();

      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 EMAIL:
        return isSetEmail();
      case PASSWORD:
        return isSetPassword();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof authenticateUser_args)
        return this.equals((authenticateUser_args)that);
      return false;
    }

    public boolean equals(authenticateUser_args that) {
      if (that == null)
        return false;

      boolean this_present_email = true && this.isSetEmail();
      boolean that_present_email = true && that.isSetEmail();
      if (this_present_email || that_present_email) {
        if (!(this_present_email && that_present_email))
          return false;
        if (!this.email.equals(that.email))
          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(authenticateUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      authenticateUser_args typedOther = (authenticateUser_args)other;

      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEmail()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
        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 {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // EMAIL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.email = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PASSWORD
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.password = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.email != null) {
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
        oprot.writeString(this.email);
        oprot.writeFieldEnd();
      }
      if (this.password != null) {
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
        oprot.writeString(this.password);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
      boolean first = true;

      sb.append("email:");
      if (this.email == null) {
        sb.append("null");
      } else {
        sb.append(this.email);
      }
      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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class authenticateUser_result implements org.apache.thrift.TBase<authenticateUser_result, authenticateUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticateUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField AUEX_FIELD_DESC = new org.apache.thrift.protocol.TField("auex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private User success; // required
    private AuthenticationException auex; // 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"),
      AUEX((short)1, "auex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // AUEX
            return AUEX;
          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, User.class)));
      tmpMap.put(_Fields.AUEX, new org.apache.thrift.meta_data.FieldMetaData("auex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
    }

    public authenticateUser_result() {
    }

    public authenticateUser_result(
      User success,
      AuthenticationException auex)
    {
      this();
      this.success = success;
      this.auex = auex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticateUser_result(authenticateUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new User(other.success);
      }
      if (other.isSetAuex()) {
        this.auex = new AuthenticationException(other.auex);
      }
    }

    public authenticateUser_result deepCopy() {
      return new authenticateUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.auex = null;
    }

    public User getSuccess() {
      return this.success;
    }

    public void setSuccess(User success) {
      this.success = success;
    }

    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 AuthenticationException getAuex() {
      return this.auex;
    }

    public void setAuex(AuthenticationException auex) {
      this.auex = auex;
    }

    public void unsetAuex() {
      this.auex = null;
    }

    /** Returns true if field auex is set (has been assigned a value) and false otherwise */
    public boolean isSetAuex() {
      return this.auex != null;
    }

    public void setAuexIsSet(boolean value) {
      if (!value) {
        this.auex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((User)value);
        }
        break;

      case AUEX:
        if (value == null) {
          unsetAuex();
        } else {
          setAuex((AuthenticationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUEX:
        return getAuex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case AUEX:
        return isSetAuex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof authenticateUser_result)
        return this.equals((authenticateUser_result)that);
      return false;
    }

    public boolean equals(authenticateUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_auex = true && this.isSetAuex();
      boolean that_present_auex = true && that.isSetAuex();
      if (this_present_auex || that_present_auex) {
        if (!(this_present_auex && that_present_auex))
          return false;
        if (!this.auex.equals(that.auex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(authenticateUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      authenticateUser_result typedOther = (authenticateUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(typedOther.isSetAuex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auex, typedOther.auex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new User();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // AUEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.auex = new AuthenticationException();
              this.auex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetAuex()) {
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
        this.auex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("auex:");
      if (this.auex == null) {
        sb.append("null");
      } else {
        sb.append(this.auex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class userExists_args implements org.apache.thrift.TBase<userExists_args, userExists_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userExists_args");

    private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String email; // 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 {
      EMAIL((short)1, "email");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EMAIL
            return EMAIL;
          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.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", 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(userExists_args.class, metaDataMap);
    }

    public userExists_args() {
    }

    public userExists_args(
      String email)
    {
      this();
      this.email = email;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public userExists_args(userExists_args other) {
      if (other.isSetEmail()) {
        this.email = other.email;
      }
    }

    public userExists_args deepCopy() {
      return new userExists_args(this);
    }

    @Override
    public void clear() {
      this.email = null;
    }

    public String getEmail() {
      return this.email;
    }

    public void setEmail(String email) {
      this.email = email;
    }

    public void unsetEmail() {
      this.email = null;
    }

    /** Returns true if field email is set (has been assigned a value) and false otherwise */
    public boolean isSetEmail() {
      return this.email != null;
    }

    public void setEmailIsSet(boolean value) {
      if (!value) {
        this.email = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EMAIL:
        if (value == null) {
          unsetEmail();
        } else {
          setEmail((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EMAIL:
        return getEmail();

      }
      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 EMAIL:
        return isSetEmail();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof userExists_args)
        return this.equals((userExists_args)that);
      return false;
    }

    public boolean equals(userExists_args that) {
      if (that == null)
        return false;

      boolean this_present_email = true && this.isSetEmail();
      boolean that_present_email = true && that.isSetEmail();
      if (this_present_email || that_present_email) {
        if (!(this_present_email && that_present_email))
          return false;
        if (!this.email.equals(that.email))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(userExists_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      userExists_args typedOther = (userExists_args)other;

      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEmail()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // EMAIL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.email = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.email != null) {
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
        oprot.writeString(this.email);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("userExists_args(");
      boolean first = true;

      sb.append("email:");
      if (this.email == null) {
        sb.append("null");
      } else {
        sb.append(this.email);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class userExists_result implements org.apache.thrift.TBase<userExists_result, userExists_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userExists_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
    }

    public userExists_result() {
    }

    public userExists_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public userExists_result(userExists_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public userExists_result deepCopy() {
      return new userExists_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof userExists_result)
        return this.equals((userExists_result)that);
      return false;
    }

    public boolean equals(userExists_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(userExists_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      userExists_result typedOther = (userExists_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("userExists_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addAddressForUser_args implements org.apache.thrift.TBase<addAddressForUser_args, addAddressForUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAddressForUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SET_DEFAULT_FIELD_DESC = new org.apache.thrift.protocol.TField("setDefault", org.apache.thrift.protocol.TType.BOOL, (short)3);

    private long userId; // required
    private Address address; // required
    private boolean setDefault; // 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 {
      USER_ID((short)1, "userId"),
      ADDRESS((short)2, "address"),
      SET_DEFAULT((short)3, "setDefault");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // ADDRESS
            return ADDRESS;
          case 3: // SET_DEFAULT
            return SET_DEFAULT;
          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 __USERID_ISSET_ID = 0;
    private static final int __SETDEFAULT_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class)));
      tmpMap.put(_Fields.SET_DEFAULT, new org.apache.thrift.meta_data.FieldMetaData("setDefault", 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(addAddressForUser_args.class, metaDataMap);
    }

    public addAddressForUser_args() {
    }

    public addAddressForUser_args(
      long userId,
      Address address,
      boolean setDefault)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.address = address;
      this.setDefault = setDefault;
      setSetDefaultIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addAddressForUser_args(addAddressForUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      if (other.isSetAddress()) {
        this.address = new Address(other.address);
      }
      this.setDefault = other.setDefault;
    }

    public addAddressForUser_args deepCopy() {
      return new addAddressForUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      this.address = null;
      setSetDefaultIsSet(false);
      this.setDefault = false;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public Address getAddress() {
      return this.address;
    }

    public void setAddress(Address address) {
      this.address = address;
    }

    public void unsetAddress() {
      this.address = null;
    }

    /** Returns true if field address is set (has been assigned a value) and false otherwise */
    public boolean isSetAddress() {
      return this.address != null;
    }

    public void setAddressIsSet(boolean value) {
      if (!value) {
        this.address = null;
      }
    }

    public boolean isSetDefault() {
      return this.setDefault;
    }

    public void setSetDefault(boolean setDefault) {
      this.setDefault = setDefault;
      setSetDefaultIsSet(true);
    }

    public void unsetSetDefault() {
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
    }

    /** Returns true if field setDefault is set (has been assigned a value) and false otherwise */
    public boolean isSetSetDefault() {
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
    }

    public void setSetDefaultIsSet(boolean value) {
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case ADDRESS:
        if (value == null) {
          unsetAddress();
        } else {
          setAddress((Address)value);
        }
        break;

      case SET_DEFAULT:
        if (value == null) {
          unsetSetDefault();
        } else {
          setSetDefault((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case ADDRESS:
        return getAddress();

      case SET_DEFAULT:
        return Boolean.valueOf(isSetDefault());

      }
      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 USER_ID:
        return isSetUserId();
      case ADDRESS:
        return isSetAddress();
      case SET_DEFAULT:
        return isSetSetDefault();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addAddressForUser_args)
        return this.equals((addAddressForUser_args)that);
      return false;
    }

    public boolean equals(addAddressForUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_address = true && this.isSetAddress();
      boolean that_present_address = true && that.isSetAddress();
      if (this_present_address || that_present_address) {
        if (!(this_present_address && that_present_address))
          return false;
        if (!this.address.equals(that.address))
          return false;
      }

      boolean this_present_setDefault = true;
      boolean that_present_setDefault = true;
      if (this_present_setDefault || that_present_setDefault) {
        if (!(this_present_setDefault && that_present_setDefault))
          return false;
        if (this.setDefault != that.setDefault)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addAddressForUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addAddressForUser_args typedOther = (addAddressForUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddress()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(typedOther.isSetSetDefault());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSetDefault()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.setDefault, typedOther.setDefault);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ADDRESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.address = new Address();
              this.address.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SET_DEFAULT
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.setDefault = iprot.readBool();
              setSetDefaultIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      if (this.address != null) {
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
        this.address.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
      oprot.writeBool(this.setDefault);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("address:");
      if (this.address == null) {
        sb.append("null");
      } else {
        sb.append(this.address);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("setDefault:");
      sb.append(this.setDefault);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addAddressForUser_result implements org.apache.thrift.TBase<addAddressForUser_result, addAddressForUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAddressForUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
    }

    public addAddressForUser_result() {
    }

    public addAddressForUser_result(
      long success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addAddressForUser_result(addAddressForUser_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public addAddressForUser_result deepCopy() {
      return new addAddressForUser_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.ucx = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addAddressForUser_result)
        return this.equals((addAddressForUser_result)that);
      return false;
    }

    public boolean equals(addAddressForUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addAddressForUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addAddressForUser_result typedOther = (addAddressForUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeAddressForUser_args implements org.apache.thrift.TBase<removeAddressForUser_args, removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeAddressForUser_args");

    private static final org.apache.thrift.protocol.TField USERID_FIELD_DESC = new org.apache.thrift.protocol.TField("userid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long userid; // required
    private long addressId; // 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 {
      USERID((short)1, "userid"),
      ADDRESS_ID((short)2, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USERID
            return USERID;
          case 2: // ADDRESS_ID
            return ADDRESS_ID;
          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 __USERID_ISSET_ID = 0;
    private static final int __ADDRESSID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USERID, new org.apache.thrift.meta_data.FieldMetaData("userid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
    }

    public removeAddressForUser_args() {
    }

    public removeAddressForUser_args(
      long userid,
      long addressId)
    {
      this();
      this.userid = userid;
      setUseridIsSet(true);
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeAddressForUser_args(removeAddressForUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userid = other.userid;
      this.addressId = other.addressId;
    }

    public removeAddressForUser_args deepCopy() {
      return new removeAddressForUser_args(this);
    }

    @Override
    public void clear() {
      setUseridIsSet(false);
      this.userid = 0;
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getUserid() {
      return this.userid;
    }

    public void setUserid(long userid) {
      this.userid = userid;
      setUseridIsSet(true);
    }

    public void unsetUserid() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userid is set (has been assigned a value) and false otherwise */
    public boolean isSetUserid() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUseridIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USERID:
        if (value == null) {
          unsetUserid();
        } else {
          setUserid((Long)value);
        }
        break;

      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USERID:
        return Long.valueOf(getUserid());

      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 USERID:
        return isSetUserid();
      case ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeAddressForUser_args)
        return this.equals((removeAddressForUser_args)that);
      return false;
    }

    public boolean equals(removeAddressForUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userid = true;
      boolean that_present_userid = true;
      if (this_present_userid || that_present_userid) {
        if (!(this_present_userid && that_present_userid))
          return false;
        if (this.userid != that.userid)
          return false;
      }

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeAddressForUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(typedOther.isSetUserid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userid, typedOther.userid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USERID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userid = iprot.readI64();
              setUseridIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USERID_FIELD_DESC);
      oprot.writeI64(this.userid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
      boolean first = true;

      sb.append("userid:");
      sb.append(this.userid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeAddressForUser_result implements org.apache.thrift.TBase<removeAddressForUser_result, removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeAddressForUser_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
    }

    public removeAddressForUser_result() {
    }

    public removeAddressForUser_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeAddressForUser_result(removeAddressForUser_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public removeAddressForUser_result deepCopy() {
      return new removeAddressForUser_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeAddressForUser_result)
        return this.equals((removeAddressForUser_result)that);
      return false;
    }

    public boolean equals(removeAddressForUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeAddressForUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateAddress_args implements org.apache.thrift.TBase<updateAddress_args, updateAddress_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateAddress_args");

    private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Address address; // 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 {
      ADDRESS((short)1, "address");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ADDRESS
            return ADDRESS;
          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.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateAddress_args.class, metaDataMap);
    }

    public updateAddress_args() {
    }

    public updateAddress_args(
      Address address)
    {
      this();
      this.address = address;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateAddress_args(updateAddress_args other) {
      if (other.isSetAddress()) {
        this.address = new Address(other.address);
      }
    }

    public updateAddress_args deepCopy() {
      return new updateAddress_args(this);
    }

    @Override
    public void clear() {
      this.address = null;
    }

    public Address getAddress() {
      return this.address;
    }

    public void setAddress(Address address) {
      this.address = address;
    }

    public void unsetAddress() {
      this.address = null;
    }

    /** Returns true if field address is set (has been assigned a value) and false otherwise */
    public boolean isSetAddress() {
      return this.address != null;
    }

    public void setAddressIsSet(boolean value) {
      if (!value) {
        this.address = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ADDRESS:
        if (value == null) {
          unsetAddress();
        } else {
          setAddress((Address)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ADDRESS:
        return getAddress();

      }
      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 ADDRESS:
        return isSetAddress();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateAddress_args)
        return this.equals((updateAddress_args)that);
      return false;
    }

    public boolean equals(updateAddress_args that) {
      if (that == null)
        return false;

      boolean this_present_address = true && this.isSetAddress();
      boolean that_present_address = true && that.isSetAddress();
      if (this_present_address || that_present_address) {
        if (!(this_present_address && that_present_address))
          return false;
        if (!this.address.equals(that.address))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateAddress_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateAddress_args typedOther = (updateAddress_args)other;

      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddress()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ADDRESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.address = new Address();
              this.address.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.address != null) {
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
        this.address.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateAddress_args(");
      boolean first = true;

      sb.append("address:");
      if (this.address == null) {
        sb.append("null");
      } else {
        sb.append(this.address);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateAddress_result implements org.apache.thrift.TBase<updateAddress_result, updateAddress_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateAddress_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateAddress_result.class, metaDataMap);
    }

    public updateAddress_result() {
    }

    public updateAddress_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateAddress_result(updateAddress_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public updateAddress_result deepCopy() {
      return new updateAddress_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateAddress_result)
        return this.equals((updateAddress_result)that);
      return false;
    }

    public boolean equals(updateAddress_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateAddress_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateAddress_result typedOther = (updateAddress_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateAddress_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateCounter_args implements org.apache.thrift.TBase<updateCounter_args, updateCounter_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateCounter_args");

    private static final org.apache.thrift.protocol.TField COUNTER_FIELD_DESC = new org.apache.thrift.protocol.TField("counter", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Counter counter; // 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 {
      COUNTER((short)1, "counter");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // COUNTER
            return COUNTER;
          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.COUNTER, new org.apache.thrift.meta_data.FieldMetaData("counter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateCounter_args.class, metaDataMap);
    }

    public updateCounter_args() {
    }

    public updateCounter_args(
      Counter counter)
    {
      this();
      this.counter = counter;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateCounter_args(updateCounter_args other) {
      if (other.isSetCounter()) {
        this.counter = new Counter(other.counter);
      }
    }

    public updateCounter_args deepCopy() {
      return new updateCounter_args(this);
    }

    @Override
    public void clear() {
      this.counter = null;
    }

    public Counter getCounter() {
      return this.counter;
    }

    public void setCounter(Counter counter) {
      this.counter = counter;
    }

    public void unsetCounter() {
      this.counter = null;
    }

    /** Returns true if field counter is set (has been assigned a value) and false otherwise */
    public boolean isSetCounter() {
      return this.counter != null;
    }

    public void setCounterIsSet(boolean value) {
      if (!value) {
        this.counter = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COUNTER:
        if (value == null) {
          unsetCounter();
        } else {
          setCounter((Counter)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COUNTER:
        return getCounter();

      }
      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 COUNTER:
        return isSetCounter();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateCounter_args)
        return this.equals((updateCounter_args)that);
      return false;
    }

    public boolean equals(updateCounter_args that) {
      if (that == null)
        return false;

      boolean this_present_counter = true && this.isSetCounter();
      boolean that_present_counter = true && that.isSetCounter();
      if (this_present_counter || that_present_counter) {
        if (!(this_present_counter && that_present_counter))
          return false;
        if (!this.counter.equals(that.counter))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateCounter_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateCounter_args typedOther = (updateCounter_args)other;

      lastComparison = Boolean.valueOf(isSetCounter()).compareTo(typedOther.isSetCounter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCounter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counter, typedOther.counter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // COUNTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.counter = new Counter();
              this.counter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.counter != null) {
        oprot.writeFieldBegin(COUNTER_FIELD_DESC);
        this.counter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateCounter_args(");
      boolean first = true;

      sb.append("counter:");
      if (this.counter == null) {
        sb.append("null");
      } else {
        sb.append(this.counter);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateCounter_result implements org.apache.thrift.TBase<updateCounter_result, updateCounter_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateCounter_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateCounter_result.class, metaDataMap);
    }

    public updateCounter_result() {
    }

    public updateCounter_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateCounter_result(updateCounter_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public updateCounter_result deepCopy() {
      return new updateCounter_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateCounter_result)
        return this.equals((updateCounter_result)that);
      return false;
    }

    public boolean equals(updateCounter_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateCounter_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateCounter_result typedOther = (updateCounter_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateCounter_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setUserAsLoggedIn_args implements org.apache.thrift.TBase<setUserAsLoggedIn_args, setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedIn_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 long userId; // required
    private long timestamp; // 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 {
      USER_ID((short)1, "userId"),
      TIMESTAMP((short)2, "timestamp");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // TIMESTAMP
            return TIMESTAMP;
          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 __USERID_ISSET_ID = 0;
    private static final int __TIMESTAMP_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", 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)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
    }

    public setUserAsLoggedIn_args() {
    }

    public setUserAsLoggedIn_args(
      long userId,
      long timestamp)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.timestamp = other.timestamp;
    }

    public setUserAsLoggedIn_args deepCopy() {
      return new setUserAsLoggedIn_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setTimestampIsSet(false);
      this.timestamp = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getTimestamp() {
      return this.timestamp;
    }

    public void setTimestamp(long timestamp) {
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    public void unsetTimestamp() {
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
    }

    /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetTimestamp() {
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
    }

    public void setTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case TIMESTAMP:
        if (value == null) {
          unsetTimestamp();
        } else {
          setTimestamp((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case TIMESTAMP:
        return Long.valueOf(getTimestamp());

      }
      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 USER_ID:
        return isSetUserId();
      case TIMESTAMP:
        return isSetTimestamp();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setUserAsLoggedIn_args)
        return this.equals((setUserAsLoggedIn_args)that);
      return false;
    }

    public boolean equals(setUserAsLoggedIn_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          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;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setUserAsLoggedIn_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        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;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.timestamp = iprot.readI64();
              setTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.timestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setUserAsLoggedIn_result implements org.apache.thrift.TBase<setUserAsLoggedIn_result, setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedIn_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
    }

    public setUserAsLoggedIn_result() {
    }

    public setUserAsLoggedIn_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public setUserAsLoggedIn_result deepCopy() {
      return new setUserAsLoggedIn_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setUserAsLoggedIn_result)
        return this.equals((setUserAsLoggedIn_result)that);
      return false;
    }

    public boolean equals(setUserAsLoggedIn_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setUserAsLoggedIn_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setUserAsLoggedOut_args implements org.apache.thrift.TBase<setUserAsLoggedOut_args, setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedOut_args");

    private static final org.apache.thrift.protocol.TField USERID_FIELD_DESC = new org.apache.thrift.protocol.TField("userid", 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 long userid; // required
    private long timestamp; // 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 {
      USERID((short)1, "userid"),
      TIMESTAMP((short)2, "timestamp");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USERID
            return USERID;
          case 2: // TIMESTAMP
            return TIMESTAMP;
          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 __USERID_ISSET_ID = 0;
    private static final int __TIMESTAMP_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USERID, new org.apache.thrift.meta_data.FieldMetaData("userid", 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)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
    }

    public setUserAsLoggedOut_args() {
    }

    public setUserAsLoggedOut_args(
      long userid,
      long timestamp)
    {
      this();
      this.userid = userid;
      setUseridIsSet(true);
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userid = other.userid;
      this.timestamp = other.timestamp;
    }

    public setUserAsLoggedOut_args deepCopy() {
      return new setUserAsLoggedOut_args(this);
    }

    @Override
    public void clear() {
      setUseridIsSet(false);
      this.userid = 0;
      setTimestampIsSet(false);
      this.timestamp = 0;
    }

    public long getUserid() {
      return this.userid;
    }

    public void setUserid(long userid) {
      this.userid = userid;
      setUseridIsSet(true);
    }

    public void unsetUserid() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userid is set (has been assigned a value) and false otherwise */
    public boolean isSetUserid() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUseridIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getTimestamp() {
      return this.timestamp;
    }

    public void setTimestamp(long timestamp) {
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    public void unsetTimestamp() {
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
    }

    /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetTimestamp() {
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
    }

    public void setTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USERID:
        if (value == null) {
          unsetUserid();
        } else {
          setUserid((Long)value);
        }
        break;

      case TIMESTAMP:
        if (value == null) {
          unsetTimestamp();
        } else {
          setTimestamp((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USERID:
        return Long.valueOf(getUserid());

      case TIMESTAMP:
        return Long.valueOf(getTimestamp());

      }
      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 USERID:
        return isSetUserid();
      case TIMESTAMP:
        return isSetTimestamp();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setUserAsLoggedOut_args)
        return this.equals((setUserAsLoggedOut_args)that);
      return false;
    }

    public boolean equals(setUserAsLoggedOut_args that) {
      if (that == null)
        return false;

      boolean this_present_userid = true;
      boolean that_present_userid = true;
      if (this_present_userid || that_present_userid) {
        if (!(this_present_userid && that_present_userid))
          return false;
        if (this.userid != that.userid)
          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;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setUserAsLoggedOut_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;

      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(typedOther.isSetUserid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userid, typedOther.userid);
        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;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USERID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userid = iprot.readI64();
              setUseridIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.timestamp = iprot.readI64();
              setTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USERID_FIELD_DESC);
      oprot.writeI64(this.userid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.timestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
      boolean first = true;

      sb.append("userid:");
      sb.append(this.userid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setUserAsLoggedOut_result implements org.apache.thrift.TBase<setUserAsLoggedOut_result, setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedOut_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
    }

    public setUserAsLoggedOut_result() {
    }

    public setUserAsLoggedOut_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public setUserAsLoggedOut_result deepCopy() {
      return new setUserAsLoggedOut_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setUserAsLoggedOut_result)
        return this.equals((setUserAsLoggedOut_result)that);
      return false;
    }

    public boolean equals(setUserAsLoggedOut_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setUserAsLoggedOut_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setDefaultAddress_args implements org.apache.thrift.TBase<setDefaultAddress_args, setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setDefaultAddress_args");

    private static final org.apache.thrift.protocol.TField USERID_FIELD_DESC = new org.apache.thrift.protocol.TField("userid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long userid; // required
    private long addressId; // 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 {
      USERID((short)1, "userid"),
      ADDRESS_ID((short)2, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USERID
            return USERID;
          case 2: // ADDRESS_ID
            return ADDRESS_ID;
          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 __USERID_ISSET_ID = 0;
    private static final int __ADDRESSID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USERID, new org.apache.thrift.meta_data.FieldMetaData("userid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
    }

    public setDefaultAddress_args() {
    }

    public setDefaultAddress_args(
      long userid,
      long addressId)
    {
      this();
      this.userid = userid;
      setUseridIsSet(true);
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setDefaultAddress_args(setDefaultAddress_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userid = other.userid;
      this.addressId = other.addressId;
    }

    public setDefaultAddress_args deepCopy() {
      return new setDefaultAddress_args(this);
    }

    @Override
    public void clear() {
      setUseridIsSet(false);
      this.userid = 0;
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getUserid() {
      return this.userid;
    }

    public void setUserid(long userid) {
      this.userid = userid;
      setUseridIsSet(true);
    }

    public void unsetUserid() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userid is set (has been assigned a value) and false otherwise */
    public boolean isSetUserid() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUseridIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USERID:
        if (value == null) {
          unsetUserid();
        } else {
          setUserid((Long)value);
        }
        break;

      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USERID:
        return Long.valueOf(getUserid());

      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 USERID:
        return isSetUserid();
      case ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setDefaultAddress_args)
        return this.equals((setDefaultAddress_args)that);
      return false;
    }

    public boolean equals(setDefaultAddress_args that) {
      if (that == null)
        return false;

      boolean this_present_userid = true;
      boolean that_present_userid = true;
      if (this_present_userid || that_present_userid) {
        if (!(this_present_userid && that_present_userid))
          return false;
        if (this.userid != that.userid)
          return false;
      }

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setDefaultAddress_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;

      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(typedOther.isSetUserid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userid, typedOther.userid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USERID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userid = iprot.readI64();
              setUseridIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USERID_FIELD_DESC);
      oprot.writeI64(this.userid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
      boolean first = true;

      sb.append("userid:");
      sb.append(this.userid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setDefaultAddress_result implements org.apache.thrift.TBase<setDefaultAddress_result, setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setDefaultAddress_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
    }

    public setDefaultAddress_result() {
    }

    public setDefaultAddress_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setDefaultAddress_result(setDefaultAddress_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public setDefaultAddress_result deepCopy() {
      return new setDefaultAddress_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setDefaultAddress_result)
        return this.equals((setDefaultAddress_result)that);
      return false;
    }

    public boolean equals(setDefaultAddress_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setDefaultAddress_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updatePassword_args implements org.apache.thrift.TBase<updatePassword_args, updatePassword_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePassword_args");

    private static final org.apache.thrift.protocol.TField USERID_FIELD_DESC = new org.apache.thrift.protocol.TField("userid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField OLD_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("oldPassword", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField NEW_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("newPassword", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long userid; // required
    private String oldPassword; // required
    private String newPassword; // 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 {
      USERID((short)1, "userid"),
      OLD_PASSWORD((short)2, "oldPassword"),
      NEW_PASSWORD((short)3, "newPassword");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USERID
            return USERID;
          case 2: // OLD_PASSWORD
            return OLD_PASSWORD;
          case 3: // NEW_PASSWORD
            return NEW_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
    private static final int __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USERID, new org.apache.thrift.meta_data.FieldMetaData("userid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.OLD_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("oldPassword", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.NEW_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("newPassword", 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(updatePassword_args.class, metaDataMap);
    }

    public updatePassword_args() {
    }

    public updatePassword_args(
      long userid,
      String oldPassword,
      String newPassword)
    {
      this();
      this.userid = userid;
      setUseridIsSet(true);
      this.oldPassword = oldPassword;
      this.newPassword = newPassword;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updatePassword_args(updatePassword_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userid = other.userid;
      if (other.isSetOldPassword()) {
        this.oldPassword = other.oldPassword;
      }
      if (other.isSetNewPassword()) {
        this.newPassword = other.newPassword;
      }
    }

    public updatePassword_args deepCopy() {
      return new updatePassword_args(this);
    }

    @Override
    public void clear() {
      setUseridIsSet(false);
      this.userid = 0;
      this.oldPassword = null;
      this.newPassword = null;
    }

    public long getUserid() {
      return this.userid;
    }

    public void setUserid(long userid) {
      this.userid = userid;
      setUseridIsSet(true);
    }

    public void unsetUserid() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userid is set (has been assigned a value) and false otherwise */
    public boolean isSetUserid() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUseridIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public String getOldPassword() {
      return this.oldPassword;
    }

    public void setOldPassword(String oldPassword) {
      this.oldPassword = oldPassword;
    }

    public void unsetOldPassword() {
      this.oldPassword = null;
    }

    /** Returns true if field oldPassword is set (has been assigned a value) and false otherwise */
    public boolean isSetOldPassword() {
      return this.oldPassword != null;
    }

    public void setOldPasswordIsSet(boolean value) {
      if (!value) {
        this.oldPassword = null;
      }
    }

    public String getNewPassword() {
      return this.newPassword;
    }

    public void setNewPassword(String newPassword) {
      this.newPassword = newPassword;
    }

    public void unsetNewPassword() {
      this.newPassword = null;
    }

    /** Returns true if field newPassword is set (has been assigned a value) and false otherwise */
    public boolean isSetNewPassword() {
      return this.newPassword != null;
    }

    public void setNewPasswordIsSet(boolean value) {
      if (!value) {
        this.newPassword = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USERID:
        if (value == null) {
          unsetUserid();
        } else {
          setUserid((Long)value);
        }
        break;

      case OLD_PASSWORD:
        if (value == null) {
          unsetOldPassword();
        } else {
          setOldPassword((String)value);
        }
        break;

      case NEW_PASSWORD:
        if (value == null) {
          unsetNewPassword();
        } else {
          setNewPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USERID:
        return Long.valueOf(getUserid());

      case OLD_PASSWORD:
        return getOldPassword();

      case NEW_PASSWORD:
        return getNewPassword();

      }
      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 USERID:
        return isSetUserid();
      case OLD_PASSWORD:
        return isSetOldPassword();
      case NEW_PASSWORD:
        return isSetNewPassword();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updatePassword_args)
        return this.equals((updatePassword_args)that);
      return false;
    }

    public boolean equals(updatePassword_args that) {
      if (that == null)
        return false;

      boolean this_present_userid = true;
      boolean that_present_userid = true;
      if (this_present_userid || that_present_userid) {
        if (!(this_present_userid && that_present_userid))
          return false;
        if (this.userid != that.userid)
          return false;
      }

      boolean this_present_oldPassword = true && this.isSetOldPassword();
      boolean that_present_oldPassword = true && that.isSetOldPassword();
      if (this_present_oldPassword || that_present_oldPassword) {
        if (!(this_present_oldPassword && that_present_oldPassword))
          return false;
        if (!this.oldPassword.equals(that.oldPassword))
          return false;
      }

      boolean this_present_newPassword = true && this.isSetNewPassword();
      boolean that_present_newPassword = true && that.isSetNewPassword();
      if (this_present_newPassword || that_present_newPassword) {
        if (!(this_present_newPassword && that_present_newPassword))
          return false;
        if (!this.newPassword.equals(that.newPassword))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updatePassword_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updatePassword_args typedOther = (updatePassword_args)other;

      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(typedOther.isSetUserid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userid, typedOther.userid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(typedOther.isSetOldPassword());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOldPassword()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldPassword, typedOther.oldPassword);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(typedOther.isSetNewPassword());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNewPassword()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newPassword, typedOther.newPassword);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USERID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userid = iprot.readI64();
              setUseridIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // OLD_PASSWORD
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.oldPassword = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NEW_PASSWORD
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.newPassword = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USERID_FIELD_DESC);
      oprot.writeI64(this.userid);
      oprot.writeFieldEnd();
      if (this.oldPassword != null) {
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
        oprot.writeString(this.oldPassword);
        oprot.writeFieldEnd();
      }
      if (this.newPassword != null) {
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
        oprot.writeString(this.newPassword);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updatePassword_args(");
      boolean first = true;

      sb.append("userid:");
      sb.append(this.userid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("oldPassword:");
      if (this.oldPassword == null) {
        sb.append("null");
      } else {
        sb.append(this.oldPassword);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("newPassword:");
      if (this.newPassword == null) {
        sb.append("null");
      } else {
        sb.append(this.newPassword);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updatePassword_result implements org.apache.thrift.TBase<updatePassword_result, updatePassword_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePassword_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
    }

    public updatePassword_result() {
    }

    public updatePassword_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updatePassword_result(updatePassword_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public updatePassword_result deepCopy() {
      return new updatePassword_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updatePassword_result)
        return this.equals((updatePassword_result)that);
      return false;
    }

    public boolean equals(updatePassword_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updatePassword_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updatePassword_result typedOther = (updatePassword_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updatePassword_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class forgotPassword_args implements org.apache.thrift.TBase<forgotPassword_args, forgotPassword_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("forgotPassword_args");

    private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField NEW_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("newPassword", org.apache.thrift.protocol.TType.STRING, (short)2);

    private String email; // required
    private String newPassword; // 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 {
      EMAIL((short)1, "email"),
      NEW_PASSWORD((short)2, "newPassword");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EMAIL
            return EMAIL;
          case 2: // NEW_PASSWORD
            return NEW_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.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.NEW_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("newPassword", 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(forgotPassword_args.class, metaDataMap);
    }

    public forgotPassword_args() {
    }

    public forgotPassword_args(
      String email,
      String newPassword)
    {
      this();
      this.email = email;
      this.newPassword = newPassword;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public forgotPassword_args(forgotPassword_args other) {
      if (other.isSetEmail()) {
        this.email = other.email;
      }
      if (other.isSetNewPassword()) {
        this.newPassword = other.newPassword;
      }
    }

    public forgotPassword_args deepCopy() {
      return new forgotPassword_args(this);
    }

    @Override
    public void clear() {
      this.email = null;
      this.newPassword = null;
    }

    public String getEmail() {
      return this.email;
    }

    public void setEmail(String email) {
      this.email = email;
    }

    public void unsetEmail() {
      this.email = null;
    }

    /** Returns true if field email is set (has been assigned a value) and false otherwise */
    public boolean isSetEmail() {
      return this.email != null;
    }

    public void setEmailIsSet(boolean value) {
      if (!value) {
        this.email = null;
      }
    }

    public String getNewPassword() {
      return this.newPassword;
    }

    public void setNewPassword(String newPassword) {
      this.newPassword = newPassword;
    }

    public void unsetNewPassword() {
      this.newPassword = null;
    }

    /** Returns true if field newPassword is set (has been assigned a value) and false otherwise */
    public boolean isSetNewPassword() {
      return this.newPassword != null;
    }

    public void setNewPasswordIsSet(boolean value) {
      if (!value) {
        this.newPassword = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EMAIL:
        if (value == null) {
          unsetEmail();
        } else {
          setEmail((String)value);
        }
        break;

      case NEW_PASSWORD:
        if (value == null) {
          unsetNewPassword();
        } else {
          setNewPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EMAIL:
        return getEmail();

      case NEW_PASSWORD:
        return getNewPassword();

      }
      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 EMAIL:
        return isSetEmail();
      case NEW_PASSWORD:
        return isSetNewPassword();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof forgotPassword_args)
        return this.equals((forgotPassword_args)that);
      return false;
    }

    public boolean equals(forgotPassword_args that) {
      if (that == null)
        return false;

      boolean this_present_email = true && this.isSetEmail();
      boolean that_present_email = true && that.isSetEmail();
      if (this_present_email || that_present_email) {
        if (!(this_present_email && that_present_email))
          return false;
        if (!this.email.equals(that.email))
          return false;
      }

      boolean this_present_newPassword = true && this.isSetNewPassword();
      boolean that_present_newPassword = true && that.isSetNewPassword();
      if (this_present_newPassword || that_present_newPassword) {
        if (!(this_present_newPassword && that_present_newPassword))
          return false;
        if (!this.newPassword.equals(that.newPassword))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(forgotPassword_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      forgotPassword_args typedOther = (forgotPassword_args)other;

      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEmail()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(typedOther.isSetNewPassword());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNewPassword()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newPassword, typedOther.newPassword);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // EMAIL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.email = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NEW_PASSWORD
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.newPassword = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.email != null) {
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
        oprot.writeString(this.email);
        oprot.writeFieldEnd();
      }
      if (this.newPassword != null) {
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
        oprot.writeString(this.newPassword);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
      boolean first = true;

      sb.append("email:");
      if (this.email == null) {
        sb.append("null");
      } else {
        sb.append(this.email);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("newPassword:");
      if (this.newPassword == null) {
        sb.append("null");
      } else {
        sb.append(this.newPassword);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class forgotPassword_result implements org.apache.thrift.TBase<forgotPassword_result, forgotPassword_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("forgotPassword_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
    }

    public forgotPassword_result() {
    }

    public forgotPassword_result(
      boolean success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public forgotPassword_result(forgotPassword_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public forgotPassword_result deepCopy() {
      return new forgotPassword_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof forgotPassword_result)
        return this.equals((forgotPassword_result)that);
      return false;
    }

    public boolean equals(forgotPassword_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(forgotPassword_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      forgotPassword_result typedOther = (forgotPassword_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAddressesForUser_args implements org.apache.thrift.TBase<getAllAddressesForUser_args, getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAddressesForUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
    }

    public getAllAddressesForUser_args() {
    }

    public getAllAddressesForUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getAllAddressesForUser_args deepCopy() {
      return new getAllAddressesForUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAddressesForUser_args)
        return this.equals((getAllAddressesForUser_args)that);
      return false;
    }

    public boolean equals(getAllAddressesForUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAddressesForUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAddressesForUser_result implements org.apache.thrift.TBase<getAllAddressesForUser_result, getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAddressesForUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Address> success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class))));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
    }

    public getAllAddressesForUser_result() {
    }

    public getAllAddressesForUser_result(
      List<Address> success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
      if (other.isSetSuccess()) {
        List<Address> __this__success = new ArrayList<Address>();
        for (Address other_element : other.success) {
          __this__success.add(new Address(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public getAllAddressesForUser_result deepCopy() {
      return new getAllAddressesForUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Address> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Address elem) {
      if (this.success == null) {
        this.success = new ArrayList<Address>();
      }
      this.success.add(elem);
    }

    public List<Address> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Address> success) {
      this.success = success;
    }

    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 UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Address>)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAddressesForUser_result)
        return this.equals((getAllAddressesForUser_result)that);
      return false;
    }

    public boolean equals(getAllAddressesForUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAddressesForUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list55 = iprot.readListBegin();
                this.success = new ArrayList<Address>(_list55.size);
                for (int _i56 = 0; _i56 < _list55.size; ++_i56)
                {
                  Address _elem57; // required
                  _elem57 = new Address();
                  _elem57.read(iprot);
                  this.success.add(_elem57);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Address _iter58 : this.success)
          {
            _iter58.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAddressById_args implements org.apache.thrift.TBase<getAddressById_args, getAddressById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAddressById_args");

    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long addressId; // 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 {
      ADDRESS_ID((short)1, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ADDRESS_ID
            return ADDRESS_ID;
          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 __ADDRESSID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAddressById_args.class, metaDataMap);
    }

    public getAddressById_args() {
    }

    public getAddressById_args(
      long addressId)
    {
      this();
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAddressById_args(getAddressById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.addressId = other.addressId;
    }

    public getAddressById_args deepCopy() {
      return new getAddressById_args(this);
    }

    @Override
    public void clear() {
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAddressById_args)
        return this.equals((getAddressById_args)that);
      return false;
    }

    public boolean equals(getAddressById_args that) {
      if (that == null)
        return false;

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAddressById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAddressById_args typedOther = (getAddressById_args)other;

      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAddressById_args(");
      boolean first = true;

      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAddressById_result implements org.apache.thrift.TBase<getAddressById_result, getAddressById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAddressById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Address success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          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, Address.class)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAddressById_result.class, metaDataMap);
    }

    public getAddressById_result() {
    }

    public getAddressById_result(
      Address success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAddressById_result(getAddressById_result other) {
      if (other.isSetSuccess()) {
        this.success = new Address(other.success);
      }
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public getAddressById_result deepCopy() {
      return new getAddressById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public Address getSuccess() {
      return this.success;
    }

    public void setSuccess(Address success) {
      this.success = success;
    }

    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 UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Address)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAddressById_result)
        return this.equals((getAddressById_result)that);
      return false;
    }

    public boolean equals(getAddressById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAddressById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAddressById_result typedOther = (getAddressById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Address();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAddressById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getDefaultAddressId_args implements org.apache.thrift.TBase<getDefaultAddressId_args, getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDefaultAddressId_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
    }

    public getDefaultAddressId_args() {
    }

    public getDefaultAddressId_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getDefaultAddressId_args deepCopy() {
      return new getDefaultAddressId_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getDefaultAddressId_args)
        return this.equals((getDefaultAddressId_args)that);
      return false;
    }

    public boolean equals(getDefaultAddressId_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getDefaultAddressId_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getDefaultAddressId_result implements org.apache.thrift.TBase<getDefaultAddressId_result, getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDefaultAddressId_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
    }

    public getDefaultAddressId_result() {
    }

    public getDefaultAddressId_result(
      long success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public getDefaultAddressId_result deepCopy() {
      return new getDefaultAddressId_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.ucx = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getDefaultAddressId_result)
        return this.equals((getDefaultAddressId_result)that);
      return false;
    }

    public boolean equals(getDefaultAddressId_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getDefaultAddressId_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getDefaultPincode_args implements org.apache.thrift.TBase<getDefaultPincode_args, getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDefaultPincode_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
    }

    public getDefaultPincode_args() {
    }

    public getDefaultPincode_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDefaultPincode_args(getDefaultPincode_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getDefaultPincode_args deepCopy() {
      return new getDefaultPincode_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getDefaultPincode_args)
        return this.equals((getDefaultPincode_args)that);
      return false;
    }

    public boolean equals(getDefaultPincode_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getDefaultPincode_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getDefaultPincode_result implements org.apache.thrift.TBase<getDefaultPincode_result, getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDefaultPincode_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private String success; // required
    private UserContextException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
    }

    public getDefaultPincode_result() {
    }

    public getDefaultPincode_result(
      String success,
      UserContextException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDefaultPincode_result(getDefaultPincode_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUcx()) {
        this.ucx = new UserContextException(other.ucx);
      }
    }

    public getDefaultPincode_result deepCopy() {
      return new getDefaultPincode_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    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 UserContextException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserContextException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserContextException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getDefaultPincode_result)
        return this.equals((getDefaultPincode_result)that);
      return false;
    }

    public boolean equals(getDefaultPincode_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getDefaultPincode_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserContextException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class saveUserCommunication_args implements org.apache.thrift.TBase<saveUserCommunication_args, saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("saveUserCommunication_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField REPLY_TO_FIELD_DESC = new org.apache.thrift.protocol.TField("replyTo", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField COMMUNICATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("communicationType", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField AIRWAYBILL_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("airwaybillNo", org.apache.thrift.protocol.TType.STRING, (short)5);
    private static final org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short)6);
    private static final org.apache.thrift.protocol.TField SUBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("subject", org.apache.thrift.protocol.TType.STRING, (short)7);
    private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)8);

    private long userId; // required
    private String replyTo; // required
    private long communicationType; // required
    private long orderId; // required
    private String airwaybillNo; // required
    private String productName; // required
    private String subject; // required
    private String message; // 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 {
      USER_ID((short)1, "userId"),
      REPLY_TO((short)2, "replyTo"),
      COMMUNICATION_TYPE((short)3, "communicationType"),
      ORDER_ID((short)4, "orderId"),
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
      PRODUCT_NAME((short)6, "productName"),
      SUBJECT((short)7, "subject"),
      MESSAGE((short)8, "message");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // REPLY_TO
            return REPLY_TO;
          case 3: // COMMUNICATION_TYPE
            return COMMUNICATION_TYPE;
          case 4: // ORDER_ID
            return ORDER_ID;
          case 5: // AIRWAYBILL_NO
            return AIRWAYBILL_NO;
          case 6: // PRODUCT_NAME
            return PRODUCT_NAME;
          case 7: // SUBJECT
            return SUBJECT;
          case 8: // MESSAGE
            return MESSAGE;
          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 __USERID_ISSET_ID = 0;
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
    private static final int __ORDERID_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.REPLY_TO, new org.apache.thrift.meta_data.FieldMetaData("replyTo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.COMMUNICATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("communicationType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AIRWAYBILL_NO, new org.apache.thrift.meta_data.FieldMetaData("airwaybillNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SUBJECT, new org.apache.thrift.meta_data.FieldMetaData("subject", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(saveUserCommunication_args.class, metaDataMap);
    }

    public saveUserCommunication_args() {
    }

    public saveUserCommunication_args(
      long userId,
      String replyTo,
      long communicationType,
      long orderId,
      String airwaybillNo,
      String productName,
      String subject,
      String message)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.replyTo = replyTo;
      this.communicationType = communicationType;
      setCommunicationTypeIsSet(true);
      this.orderId = orderId;
      setOrderIdIsSet(true);
      this.airwaybillNo = airwaybillNo;
      this.productName = productName;
      this.subject = subject;
      this.message = message;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public saveUserCommunication_args(saveUserCommunication_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      if (other.isSetReplyTo()) {
        this.replyTo = other.replyTo;
      }
      this.communicationType = other.communicationType;
      this.orderId = other.orderId;
      if (other.isSetAirwaybillNo()) {
        this.airwaybillNo = other.airwaybillNo;
      }
      if (other.isSetProductName()) {
        this.productName = other.productName;
      }
      if (other.isSetSubject()) {
        this.subject = other.subject;
      }
      if (other.isSetMessage()) {
        this.message = other.message;
      }
    }

    public saveUserCommunication_args deepCopy() {
      return new saveUserCommunication_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      this.replyTo = null;
      setCommunicationTypeIsSet(false);
      this.communicationType = 0;
      setOrderIdIsSet(false);
      this.orderId = 0;
      this.airwaybillNo = null;
      this.productName = null;
      this.subject = null;
      this.message = null;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public String getReplyTo() {
      return this.replyTo;
    }

    public void setReplyTo(String replyTo) {
      this.replyTo = replyTo;
    }

    public void unsetReplyTo() {
      this.replyTo = null;
    }

    /** Returns true if field replyTo is set (has been assigned a value) and false otherwise */
    public boolean isSetReplyTo() {
      return this.replyTo != null;
    }

    public void setReplyToIsSet(boolean value) {
      if (!value) {
        this.replyTo = null;
      }
    }

    public long getCommunicationType() {
      return this.communicationType;
    }

    public void setCommunicationType(long communicationType) {
      this.communicationType = communicationType;
      setCommunicationTypeIsSet(true);
    }

    public void unsetCommunicationType() {
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
    }

    /** Returns true if field communicationType is set (has been assigned a value) and false otherwise */
    public boolean isSetCommunicationType() {
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
    }

    public void setCommunicationTypeIsSet(boolean value) {
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
    }

    public long getOrderId() {
      return this.orderId;
    }

    public void setOrderId(long orderId) {
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    public void unsetOrderId() {
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
    }

    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderId() {
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
    }

    public void setOrderIdIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
    }

    public String getAirwaybillNo() {
      return this.airwaybillNo;
    }

    public void setAirwaybillNo(String airwaybillNo) {
      this.airwaybillNo = airwaybillNo;
    }

    public void unsetAirwaybillNo() {
      this.airwaybillNo = null;
    }

    /** Returns true if field airwaybillNo is set (has been assigned a value) and false otherwise */
    public boolean isSetAirwaybillNo() {
      return this.airwaybillNo != null;
    }

    public void setAirwaybillNoIsSet(boolean value) {
      if (!value) {
        this.airwaybillNo = null;
      }
    }

    public String getProductName() {
      return this.productName;
    }

    public void setProductName(String productName) {
      this.productName = productName;
    }

    public void unsetProductName() {
      this.productName = null;
    }

    /** Returns true if field productName is set (has been assigned a value) and false otherwise */
    public boolean isSetProductName() {
      return this.productName != null;
    }

    public void setProductNameIsSet(boolean value) {
      if (!value) {
        this.productName = null;
      }
    }

    public String getSubject() {
      return this.subject;
    }

    public void setSubject(String subject) {
      this.subject = subject;
    }

    public void unsetSubject() {
      this.subject = null;
    }

    /** Returns true if field subject is set (has been assigned a value) and false otherwise */
    public boolean isSetSubject() {
      return this.subject != null;
    }

    public void setSubjectIsSet(boolean value) {
      if (!value) {
        this.subject = null;
      }
    }

    public String getMessage() {
      return this.message;
    }

    public void setMessage(String message) {
      this.message = message;
    }

    public void unsetMessage() {
      this.message = null;
    }

    /** Returns true if field message is set (has been assigned a value) and false otherwise */
    public boolean isSetMessage() {
      return this.message != null;
    }

    public void setMessageIsSet(boolean value) {
      if (!value) {
        this.message = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case REPLY_TO:
        if (value == null) {
          unsetReplyTo();
        } else {
          setReplyTo((String)value);
        }
        break;

      case COMMUNICATION_TYPE:
        if (value == null) {
          unsetCommunicationType();
        } else {
          setCommunicationType((Long)value);
        }
        break;

      case ORDER_ID:
        if (value == null) {
          unsetOrderId();
        } else {
          setOrderId((Long)value);
        }
        break;

      case AIRWAYBILL_NO:
        if (value == null) {
          unsetAirwaybillNo();
        } else {
          setAirwaybillNo((String)value);
        }
        break;

      case PRODUCT_NAME:
        if (value == null) {
          unsetProductName();
        } else {
          setProductName((String)value);
        }
        break;

      case SUBJECT:
        if (value == null) {
          unsetSubject();
        } else {
          setSubject((String)value);
        }
        break;

      case MESSAGE:
        if (value == null) {
          unsetMessage();
        } else {
          setMessage((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case REPLY_TO:
        return getReplyTo();

      case COMMUNICATION_TYPE:
        return Long.valueOf(getCommunicationType());

      case ORDER_ID:
        return Long.valueOf(getOrderId());

      case AIRWAYBILL_NO:
        return getAirwaybillNo();

      case PRODUCT_NAME:
        return getProductName();

      case SUBJECT:
        return getSubject();

      case MESSAGE:
        return getMessage();

      }
      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 USER_ID:
        return isSetUserId();
      case REPLY_TO:
        return isSetReplyTo();
      case COMMUNICATION_TYPE:
        return isSetCommunicationType();
      case ORDER_ID:
        return isSetOrderId();
      case AIRWAYBILL_NO:
        return isSetAirwaybillNo();
      case PRODUCT_NAME:
        return isSetProductName();
      case SUBJECT:
        return isSetSubject();
      case MESSAGE:
        return isSetMessage();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof saveUserCommunication_args)
        return this.equals((saveUserCommunication_args)that);
      return false;
    }

    public boolean equals(saveUserCommunication_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_replyTo = true && this.isSetReplyTo();
      boolean that_present_replyTo = true && that.isSetReplyTo();
      if (this_present_replyTo || that_present_replyTo) {
        if (!(this_present_replyTo && that_present_replyTo))
          return false;
        if (!this.replyTo.equals(that.replyTo))
          return false;
      }

      boolean this_present_communicationType = true;
      boolean that_present_communicationType = true;
      if (this_present_communicationType || that_present_communicationType) {
        if (!(this_present_communicationType && that_present_communicationType))
          return false;
        if (this.communicationType != that.communicationType)
          return false;
      }

      boolean this_present_orderId = true;
      boolean that_present_orderId = true;
      if (this_present_orderId || that_present_orderId) {
        if (!(this_present_orderId && that_present_orderId))
          return false;
        if (this.orderId != that.orderId)
          return false;
      }

      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
          return false;
        if (!this.airwaybillNo.equals(that.airwaybillNo))
          return false;
      }

      boolean this_present_productName = true && this.isSetProductName();
      boolean that_present_productName = true && that.isSetProductName();
      if (this_present_productName || that_present_productName) {
        if (!(this_present_productName && that_present_productName))
          return false;
        if (!this.productName.equals(that.productName))
          return false;
      }

      boolean this_present_subject = true && this.isSetSubject();
      boolean that_present_subject = true && that.isSetSubject();
      if (this_present_subject || that_present_subject) {
        if (!(this_present_subject && that_present_subject))
          return false;
        if (!this.subject.equals(that.subject))
          return false;
      }

      boolean this_present_message = true && this.isSetMessage();
      boolean that_present_message = true && that.isSetMessage();
      if (this_present_message || that_present_message) {
        if (!(this_present_message && that_present_message))
          return false;
        if (!this.message.equals(that.message))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(saveUserCommunication_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(typedOther.isSetReplyTo());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetReplyTo()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replyTo, typedOther.replyTo);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(typedOther.isSetCommunicationType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCommunicationType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationType, typedOther.communicationType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(typedOther.isSetAirwaybillNo());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAirwaybillNo()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airwaybillNo, typedOther.airwaybillNo);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(typedOther.isSetProductName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProductName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productName, typedOther.productName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(typedOther.isSetSubject());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSubject()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subject, typedOther.subject);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMessage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // REPLY_TO
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.replyTo = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // COMMUNICATION_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.communicationType = iprot.readI64();
              setCommunicationTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ORDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderId = iprot.readI64();
              setOrderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // AIRWAYBILL_NO
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.airwaybillNo = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // PRODUCT_NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.productName = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 7: // SUBJECT
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.subject = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 8: // MESSAGE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.message = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      if (this.replyTo != null) {
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
        oprot.writeString(this.replyTo);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
      oprot.writeI64(this.communicationType);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
      if (this.airwaybillNo != null) {
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
        oprot.writeString(this.airwaybillNo);
        oprot.writeFieldEnd();
      }
      if (this.productName != null) {
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
        oprot.writeString(this.productName);
        oprot.writeFieldEnd();
      }
      if (this.subject != null) {
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
        oprot.writeString(this.subject);
        oprot.writeFieldEnd();
      }
      if (this.message != null) {
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
        oprot.writeString(this.message);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("replyTo:");
      if (this.replyTo == null) {
        sb.append("null");
      } else {
        sb.append(this.replyTo);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("communicationType:");
      sb.append(this.communicationType);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("airwaybillNo:");
      if (this.airwaybillNo == null) {
        sb.append("null");
      } else {
        sb.append(this.airwaybillNo);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("productName:");
      if (this.productName == null) {
        sb.append("null");
      } else {
        sb.append(this.productName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("subject:");
      if (this.subject == null) {
        sb.append("null");
      } else {
        sb.append(this.subject);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("message:");
      if (this.message == null) {
        sb.append("null");
      } else {
        sb.append(this.message);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class saveUserCommunication_result implements org.apache.thrift.TBase<saveUserCommunication_result, saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("saveUserCommunication_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 org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private UserCommunicationException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
    }

    public saveUserCommunication_result() {
    }

    public saveUserCommunication_result(
      boolean success,
      UserCommunicationException ucx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public saveUserCommunication_result(saveUserCommunication_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUcx()) {
        this.ucx = new UserCommunicationException(other.ucx);
      }
    }

    public saveUserCommunication_result deepCopy() {
      return new saveUserCommunication_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ucx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserCommunicationException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserCommunicationException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserCommunicationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof saveUserCommunication_result)
        return this.equals((saveUserCommunication_result)that);
      return false;
    }

    public boolean equals(saveUserCommunication_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(saveUserCommunication_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserCommunicationException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCommunicationById_args implements org.apache.thrift.TBase<getUserCommunicationById_args, getUserCommunicationById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCommunicationById_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCommunicationById_args.class, metaDataMap);
    }

    public getUserCommunicationById_args() {
    }

    public getUserCommunicationById_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCommunicationById_args(getUserCommunicationById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getUserCommunicationById_args deepCopy() {
      return new getUserCommunicationById_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserCommunicationById_args)
        return this.equals((getUserCommunicationById_args)that);
      return false;
    }

    public boolean equals(getUserCommunicationById_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserCommunicationById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCommunicationById_args typedOther = (getUserCommunicationById_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCommunicationById_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCommunicationById_result implements org.apache.thrift.TBase<getUserCommunicationById_result, getUserCommunicationById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCommunicationById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private UserCommunication success; // required
    private UserCommunicationException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          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, UserCommunication.class)));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCommunicationById_result.class, metaDataMap);
    }

    public getUserCommunicationById_result() {
    }

    public getUserCommunicationById_result(
      UserCommunication success,
      UserCommunicationException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCommunicationById_result(getUserCommunicationById_result other) {
      if (other.isSetSuccess()) {
        this.success = new UserCommunication(other.success);
      }
      if (other.isSetUcx()) {
        this.ucx = new UserCommunicationException(other.ucx);
      }
    }

    public getUserCommunicationById_result deepCopy() {
      return new getUserCommunicationById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public UserCommunication getSuccess() {
      return this.success;
    }

    public void setSuccess(UserCommunication success) {
      this.success = success;
    }

    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 UserCommunicationException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserCommunicationException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((UserCommunication)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserCommunicationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserCommunicationById_result)
        return this.equals((getUserCommunicationById_result)that);
      return false;
    }

    public boolean equals(getUserCommunicationById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserCommunicationById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCommunicationById_result typedOther = (getUserCommunicationById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new UserCommunication();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserCommunicationException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCommunicationById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCommunicationByUser_args implements org.apache.thrift.TBase<getUserCommunicationByUser_args, getUserCommunicationByUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCommunicationByUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_args.class, metaDataMap);
    }

    public getUserCommunicationByUser_args() {
    }

    public getUserCommunicationByUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCommunicationByUser_args(getUserCommunicationByUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getUserCommunicationByUser_args deepCopy() {
      return new getUserCommunicationByUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserCommunicationByUser_args)
        return this.equals((getUserCommunicationByUser_args)that);
      return false;
    }

    public boolean equals(getUserCommunicationByUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserCommunicationByUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCommunicationByUser_args typedOther = (getUserCommunicationByUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCommunicationByUser_result implements org.apache.thrift.TBase<getUserCommunicationByUser_result, getUserCommunicationByUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCommunicationByUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<UserCommunication> success; // required
    private UserCommunicationException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserCommunication.class))));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_result.class, metaDataMap);
    }

    public getUserCommunicationByUser_result() {
    }

    public getUserCommunicationByUser_result(
      List<UserCommunication> success,
      UserCommunicationException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCommunicationByUser_result(getUserCommunicationByUser_result other) {
      if (other.isSetSuccess()) {
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
        for (UserCommunication other_element : other.success) {
          __this__success.add(new UserCommunication(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUcx()) {
        this.ucx = new UserCommunicationException(other.ucx);
      }
    }

    public getUserCommunicationByUser_result deepCopy() {
      return new getUserCommunicationByUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<UserCommunication> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(UserCommunication elem) {
      if (this.success == null) {
        this.success = new ArrayList<UserCommunication>();
      }
      this.success.add(elem);
    }

    public List<UserCommunication> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<UserCommunication> success) {
      this.success = success;
    }

    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 UserCommunicationException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserCommunicationException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<UserCommunication>)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserCommunicationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserCommunicationByUser_result)
        return this.equals((getUserCommunicationByUser_result)that);
      return false;
    }

    public boolean equals(getUserCommunicationByUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserCommunicationByUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCommunicationByUser_result typedOther = (getUserCommunicationByUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
                this.success = new ArrayList<UserCommunication>(_list59.size);
                for (int _i60 = 0; _i60 < _list59.size; ++_i60)
                {
                  UserCommunication _elem61; // required
                  _elem61 = new UserCommunication();
                  _elem61.read(iprot);
                  this.success.add(_elem61);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserCommunicationException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (UserCommunication _iter62 : this.success)
          {
            _iter62.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUserCommunications_args implements org.apache.thrift.TBase<getAllUserCommunications_args, getAllUserCommunications_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserCommunications_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserCommunications_args.class, metaDataMap);
    }

    public getAllUserCommunications_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUserCommunications_args(getAllUserCommunications_args other) {
    }

    public getAllUserCommunications_args deepCopy() {
      return new getAllUserCommunications_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllUserCommunications_args)
        return this.equals((getAllUserCommunications_args)that);
      return false;
    }

    public boolean equals(getAllUserCommunications_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllUserCommunications_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUserCommunications_args typedOther = (getAllUserCommunications_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUserCommunications_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUserCommunications_result implements org.apache.thrift.TBase<getAllUserCommunications_result, getAllUserCommunications_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserCommunications_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<UserCommunication> success; // required
    private UserCommunicationException ucx; // 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"),
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UCX
            return UCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserCommunication.class))));
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserCommunications_result.class, metaDataMap);
    }

    public getAllUserCommunications_result() {
    }

    public getAllUserCommunications_result(
      List<UserCommunication> success,
      UserCommunicationException ucx)
    {
      this();
      this.success = success;
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUserCommunications_result(getAllUserCommunications_result other) {
      if (other.isSetSuccess()) {
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
        for (UserCommunication other_element : other.success) {
          __this__success.add(new UserCommunication(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUcx()) {
        this.ucx = new UserCommunicationException(other.ucx);
      }
    }

    public getAllUserCommunications_result deepCopy() {
      return new getAllUserCommunications_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ucx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<UserCommunication> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(UserCommunication elem) {
      if (this.success == null) {
        this.success = new ArrayList<UserCommunication>();
      }
      this.success.add(elem);
    }

    public List<UserCommunication> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<UserCommunication> success) {
      this.success = success;
    }

    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 UserCommunicationException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserCommunicationException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<UserCommunication>)value);
        }
        break;

      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserCommunicationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UCX:
        return getUcx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllUserCommunications_result)
        return this.equals((getAllUserCommunications_result)that);
      return false;
    }

    public boolean equals(getAllUserCommunications_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllUserCommunications_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUserCommunications_result typedOther = (getAllUserCommunications_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list63 = iprot.readListBegin();
                this.success = new ArrayList<UserCommunication>(_list63.size);
                for (int _i64 = 0; _i64 < _list63.size; ++_i64)
                {
                  UserCommunication _elem65; // required
                  _elem65 = new UserCommunication();
                  _elem65.read(iprot);
                  this.success.add(_elem65);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserCommunicationException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (UserCommunication _iter66 : this.success)
          {
            _iter66.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUserCommunications_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeUserCommunication_args implements org.apache.thrift.TBase<removeUserCommunication_args, removeUserCommunication_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeUserCommunication_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeUserCommunication_args.class, metaDataMap);
    }

    public removeUserCommunication_args() {
    }

    public removeUserCommunication_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeUserCommunication_args(removeUserCommunication_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public removeUserCommunication_args deepCopy() {
      return new removeUserCommunication_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeUserCommunication_args)
        return this.equals((removeUserCommunication_args)that);
      return false;
    }

    public boolean equals(removeUserCommunication_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeUserCommunication_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeUserCommunication_args typedOther = (removeUserCommunication_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeUserCommunication_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeUserCommunication_result implements org.apache.thrift.TBase<removeUserCommunication_result, removeUserCommunication_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeUserCommunication_result");

    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private UserCommunicationException ucx; // 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 {
      UCX((short)1, "ucx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // UCX
            return UCX;
          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.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeUserCommunication_result.class, metaDataMap);
    }

    public removeUserCommunication_result() {
    }

    public removeUserCommunication_result(
      UserCommunicationException ucx)
    {
      this();
      this.ucx = ucx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeUserCommunication_result(removeUserCommunication_result other) {
      if (other.isSetUcx()) {
        this.ucx = new UserCommunicationException(other.ucx);
      }
    }

    public removeUserCommunication_result deepCopy() {
      return new removeUserCommunication_result(this);
    }

    @Override
    public void clear() {
      this.ucx = null;
    }

    public UserCommunicationException getUcx() {
      return this.ucx;
    }

    public void setUcx(UserCommunicationException ucx) {
      this.ucx = ucx;
    }

    public void unsetUcx() {
      this.ucx = null;
    }

    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
    public boolean isSetUcx() {
      return this.ucx != null;
    }

    public void setUcxIsSet(boolean value) {
      if (!value) {
        this.ucx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case UCX:
        if (value == null) {
          unsetUcx();
        } else {
          setUcx((UserCommunicationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case UCX:
        return getUcx();

      }
      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 UCX:
        return isSetUcx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeUserCommunication_result)
        return this.equals((removeUserCommunication_result)that);
      return false;
    }

    public boolean equals(removeUserCommunication_result that) {
      if (that == null)
        return false;

      boolean this_present_ucx = true && this.isSetUcx();
      boolean that_present_ucx = true && that.isSetUcx();
      if (this_present_ucx || that_present_ucx) {
        if (!(this_present_ucx && that_present_ucx))
          return false;
        if (!this.ucx.equals(that.ucx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeUserCommunication_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeUserCommunication_result typedOther = (removeUserCommunication_result)other;

      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUcx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // UCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ucx = new UserCommunicationException();
              this.ucx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetUcx()) {
        oprot.writeFieldBegin(UCX_FIELD_DESC);
        this.ucx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeUserCommunication_result(");
      boolean first = true;

      sb.append("ucx:");
      if (this.ucx == null) {
        sb.append("null");
      } else {
        sb.append(this.ucx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createMasterAffiliate_args implements org.apache.thrift.TBase<createMasterAffiliate_args, createMasterAffiliate_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMasterAffiliate_args");

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);

    private String name; // required
    private long addedOn; // 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 {
      NAME((short)1, "name"),
      ADDED_ON((short)2, "addedOn");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // ADDED_ON
            return ADDED_ON;
          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 __ADDEDON_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMasterAffiliate_args.class, metaDataMap);
    }

    public createMasterAffiliate_args() {
    }

    public createMasterAffiliate_args(
      String name,
      long addedOn)
    {
      this();
      this.name = name;
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createMasterAffiliate_args(createMasterAffiliate_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetName()) {
        this.name = other.name;
      }
      this.addedOn = other.addedOn;
    }

    public createMasterAffiliate_args deepCopy() {
      return new createMasterAffiliate_args(this);
    }

    @Override
    public void clear() {
      this.name = null;
      setAddedOnIsSet(false);
      this.addedOn = 0;
    }

    public String getName() {
      return this.name;
    }

    public void setName(String name) {
      this.name = name;
    }

    public void unsetName() {
      this.name = null;
    }

    /** Returns true if field name is set (has been assigned a value) and false otherwise */
    public boolean isSetName() {
      return this.name != null;
    }

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public long getAddedOn() {
      return this.addedOn;
    }

    public void setAddedOn(long addedOn) {
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    public void unsetAddedOn() {
      __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
    }

    /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
    public boolean isSetAddedOn() {
      return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
    }

    public void setAddedOnIsSet(boolean value) {
      __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((String)value);
        }
        break;

      case ADDED_ON:
        if (value == null) {
          unsetAddedOn();
        } else {
          setAddedOn((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case ADDED_ON:
        return Long.valueOf(getAddedOn());

      }
      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 NAME:
        return isSetName();
      case ADDED_ON:
        return isSetAddedOn();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createMasterAffiliate_args)
        return this.equals((createMasterAffiliate_args)that);
      return false;
    }

    public boolean equals(createMasterAffiliate_args that) {
      if (that == null)
        return false;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_addedOn = true;
      boolean that_present_addedOn = true;
      if (this_present_addedOn || that_present_addedOn) {
        if (!(this_present_addedOn && that_present_addedOn))
          return false;
        if (this.addedOn != that.addedOn)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createMasterAffiliate_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createMasterAffiliate_args typedOther = (createMasterAffiliate_args)other;

      lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddedOn()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.name = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ADDED_ON
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addedOn = iprot.readI64();
              setAddedOnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(this.name);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
      oprot.writeI64(this.addedOn);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createMasterAffiliate_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("addedOn:");
      sb.append(this.addedOn);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createMasterAffiliate_result implements org.apache.thrift.TBase<createMasterAffiliate_result, createMasterAffiliate_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createMasterAffiliate_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private MasterAffiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, MasterAffiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createMasterAffiliate_result.class, metaDataMap);
    }

    public createMasterAffiliate_result() {
    }

    public createMasterAffiliate_result(
      MasterAffiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createMasterAffiliate_result(createMasterAffiliate_result other) {
      if (other.isSetSuccess()) {
        this.success = new MasterAffiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public createMasterAffiliate_result deepCopy() {
      return new createMasterAffiliate_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public MasterAffiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(MasterAffiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((MasterAffiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createMasterAffiliate_result)
        return this.equals((createMasterAffiliate_result)that);
      return false;
    }

    public boolean equals(createMasterAffiliate_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createMasterAffiliate_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createMasterAffiliate_result typedOther = (createMasterAffiliate_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new MasterAffiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createMasterAffiliate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllMasterAffiliates_args implements org.apache.thrift.TBase<getAllMasterAffiliates_args, getAllMasterAffiliates_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllMasterAffiliates_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllMasterAffiliates_args.class, metaDataMap);
    }

    public getAllMasterAffiliates_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllMasterAffiliates_args(getAllMasterAffiliates_args other) {
    }

    public getAllMasterAffiliates_args deepCopy() {
      return new getAllMasterAffiliates_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllMasterAffiliates_args)
        return this.equals((getAllMasterAffiliates_args)that);
      return false;
    }

    public boolean equals(getAllMasterAffiliates_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllMasterAffiliates_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllMasterAffiliates_args typedOther = (getAllMasterAffiliates_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllMasterAffiliates_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllMasterAffiliates_result implements org.apache.thrift.TBase<getAllMasterAffiliates_result, getAllMasterAffiliates_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllMasterAffiliates_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<MasterAffiliate> success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MasterAffiliate.class))));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllMasterAffiliates_result.class, metaDataMap);
    }

    public getAllMasterAffiliates_result() {
    }

    public getAllMasterAffiliates_result(
      List<MasterAffiliate> success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllMasterAffiliates_result(getAllMasterAffiliates_result other) {
      if (other.isSetSuccess()) {
        List<MasterAffiliate> __this__success = new ArrayList<MasterAffiliate>();
        for (MasterAffiliate other_element : other.success) {
          __this__success.add(new MasterAffiliate(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getAllMasterAffiliates_result deepCopy() {
      return new getAllMasterAffiliates_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<MasterAffiliate> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(MasterAffiliate elem) {
      if (this.success == null) {
        this.success = new ArrayList<MasterAffiliate>();
      }
      this.success.add(elem);
    }

    public List<MasterAffiliate> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<MasterAffiliate> success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<MasterAffiliate>)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllMasterAffiliates_result)
        return this.equals((getAllMasterAffiliates_result)that);
      return false;
    }

    public boolean equals(getAllMasterAffiliates_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllMasterAffiliates_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllMasterAffiliates_result typedOther = (getAllMasterAffiliates_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list67 = iprot.readListBegin();
                this.success = new ArrayList<MasterAffiliate>(_list67.size);
                for (int _i68 = 0; _i68 < _list67.size; ++_i68)
                {
                  MasterAffiliate _elem69; // required
                  _elem69 = new MasterAffiliate();
                  _elem69.read(iprot);
                  this.success.add(_elem69);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (MasterAffiliate _iter70 : this.success)
          {
            _iter70.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllMasterAffiliates_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMasterAffiliateById_args implements org.apache.thrift.TBase<getMasterAffiliateById_args, getMasterAffiliateById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMasterAffiliateById_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMasterAffiliateById_args.class, metaDataMap);
    }

    public getMasterAffiliateById_args() {
    }

    public getMasterAffiliateById_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMasterAffiliateById_args(getMasterAffiliateById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getMasterAffiliateById_args deepCopy() {
      return new getMasterAffiliateById_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMasterAffiliateById_args)
        return this.equals((getMasterAffiliateById_args)that);
      return false;
    }

    public boolean equals(getMasterAffiliateById_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMasterAffiliateById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMasterAffiliateById_args typedOther = (getMasterAffiliateById_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMasterAffiliateById_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMasterAffiliateById_result implements org.apache.thrift.TBase<getMasterAffiliateById_result, getMasterAffiliateById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMasterAffiliateById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private MasterAffiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, MasterAffiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMasterAffiliateById_result.class, metaDataMap);
    }

    public getMasterAffiliateById_result() {
    }

    public getMasterAffiliateById_result(
      MasterAffiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMasterAffiliateById_result(getMasterAffiliateById_result other) {
      if (other.isSetSuccess()) {
        this.success = new MasterAffiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getMasterAffiliateById_result deepCopy() {
      return new getMasterAffiliateById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public MasterAffiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(MasterAffiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((MasterAffiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMasterAffiliateById_result)
        return this.equals((getMasterAffiliateById_result)that);
      return false;
    }

    public boolean equals(getMasterAffiliateById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMasterAffiliateById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMasterAffiliateById_result typedOther = (getMasterAffiliateById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new MasterAffiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMasterAffiliateById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMasterAffiliateByName_args implements org.apache.thrift.TBase<getMasterAffiliateByName_args, getMasterAffiliateByName_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMasterAffiliateByName_args");

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String name; // 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 {
      NAME((short)1, "name");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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(getMasterAffiliateByName_args.class, metaDataMap);
    }

    public getMasterAffiliateByName_args() {
    }

    public getMasterAffiliateByName_args(
      String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMasterAffiliateByName_args(getMasterAffiliateByName_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

    public getMasterAffiliateByName_args deepCopy() {
      return new getMasterAffiliateByName_args(this);
    }

    @Override
    public void clear() {
      this.name = null;
    }

    public String getName() {
      return this.name;
    }

    public void setName(String name) {
      this.name = name;
    }

    public void unsetName() {
      this.name = null;
    }

    /** Returns true if field name is set (has been assigned a value) and false otherwise */
    public boolean isSetName() {
      return this.name != null;
    }

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      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 NAME:
        return isSetName();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMasterAffiliateByName_args)
        return this.equals((getMasterAffiliateByName_args)that);
      return false;
    }

    public boolean equals(getMasterAffiliateByName_args that) {
      if (that == null)
        return false;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMasterAffiliateByName_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMasterAffiliateByName_args typedOther = (getMasterAffiliateByName_args)other;

      lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.name = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(this.name);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMasterAffiliateByName_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMasterAffiliateByName_result implements org.apache.thrift.TBase<getMasterAffiliateByName_result, getMasterAffiliateByName_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMasterAffiliateByName_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private MasterAffiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, MasterAffiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMasterAffiliateByName_result.class, metaDataMap);
    }

    public getMasterAffiliateByName_result() {
    }

    public getMasterAffiliateByName_result(
      MasterAffiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMasterAffiliateByName_result(getMasterAffiliateByName_result other) {
      if (other.isSetSuccess()) {
        this.success = new MasterAffiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getMasterAffiliateByName_result deepCopy() {
      return new getMasterAffiliateByName_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public MasterAffiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(MasterAffiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((MasterAffiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMasterAffiliateByName_result)
        return this.equals((getMasterAffiliateByName_result)that);
      return false;
    }

    public boolean equals(getMasterAffiliateByName_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMasterAffiliateByName_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMasterAffiliateByName_result typedOther = (getMasterAffiliateByName_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new MasterAffiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMasterAffiliateByName_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createAffiliate_args implements org.apache.thrift.TBase<createAffiliate_args, createAffiliate_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAffiliate_args");

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField URL_FIELD_DESC = new org.apache.thrift.protocol.TField("url", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField MASTER_AFFILIATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("masterAffiliateId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)4);

    private String name; // required
    private String url; // required
    private long masterAffiliateId; // required
    private long addedOn; // 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 {
      NAME((short)1, "name"),
      URL((short)2, "url"),
      MASTER_AFFILIATE_ID((short)3, "masterAffiliateId"),
      ADDED_ON((short)4, "addedOn");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // URL
            return URL;
          case 3: // MASTER_AFFILIATE_ID
            return MASTER_AFFILIATE_ID;
          case 4: // ADDED_ON
            return ADDED_ON;
          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 __MASTERAFFILIATEID_ISSET_ID = 0;
    private static final int __ADDEDON_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URL, new org.apache.thrift.meta_data.FieldMetaData("url", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.MASTER_AFFILIATE_ID, new org.apache.thrift.meta_data.FieldMetaData("masterAffiliateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAffiliate_args.class, metaDataMap);
    }

    public createAffiliate_args() {
    }

    public createAffiliate_args(
      String name,
      String url,
      long masterAffiliateId,
      long addedOn)
    {
      this();
      this.name = name;
      this.url = url;
      this.masterAffiliateId = masterAffiliateId;
      setMasterAffiliateIdIsSet(true);
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createAffiliate_args(createAffiliate_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetUrl()) {
        this.url = other.url;
      }
      this.masterAffiliateId = other.masterAffiliateId;
      this.addedOn = other.addedOn;
    }

    public createAffiliate_args deepCopy() {
      return new createAffiliate_args(this);
    }

    @Override
    public void clear() {
      this.name = null;
      this.url = null;
      setMasterAffiliateIdIsSet(false);
      this.masterAffiliateId = 0;
      setAddedOnIsSet(false);
      this.addedOn = 0;
    }

    public String getName() {
      return this.name;
    }

    public void setName(String name) {
      this.name = name;
    }

    public void unsetName() {
      this.name = null;
    }

    /** Returns true if field name is set (has been assigned a value) and false otherwise */
    public boolean isSetName() {
      return this.name != null;
    }

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public String getUrl() {
      return this.url;
    }

    public void setUrl(String url) {
      this.url = url;
    }

    public void unsetUrl() {
      this.url = null;
    }

    /** Returns true if field url is set (has been assigned a value) and false otherwise */
    public boolean isSetUrl() {
      return this.url != null;
    }

    public void setUrlIsSet(boolean value) {
      if (!value) {
        this.url = null;
      }
    }

    public long getMasterAffiliateId() {
      return this.masterAffiliateId;
    }

    public void setMasterAffiliateId(long masterAffiliateId) {
      this.masterAffiliateId = masterAffiliateId;
      setMasterAffiliateIdIsSet(true);
    }

    public void unsetMasterAffiliateId() {
      __isset_bit_vector.clear(__MASTERAFFILIATEID_ISSET_ID);
    }

    /** Returns true if field masterAffiliateId is set (has been assigned a value) and false otherwise */
    public boolean isSetMasterAffiliateId() {
      return __isset_bit_vector.get(__MASTERAFFILIATEID_ISSET_ID);
    }

    public void setMasterAffiliateIdIsSet(boolean value) {
      __isset_bit_vector.set(__MASTERAFFILIATEID_ISSET_ID, value);
    }

    public long getAddedOn() {
      return this.addedOn;
    }

    public void setAddedOn(long addedOn) {
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    public void unsetAddedOn() {
      __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
    }

    /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
    public boolean isSetAddedOn() {
      return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
    }

    public void setAddedOnIsSet(boolean value) {
      __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((String)value);
        }
        break;

      case URL:
        if (value == null) {
          unsetUrl();
        } else {
          setUrl((String)value);
        }
        break;

      case MASTER_AFFILIATE_ID:
        if (value == null) {
          unsetMasterAffiliateId();
        } else {
          setMasterAffiliateId((Long)value);
        }
        break;

      case ADDED_ON:
        if (value == null) {
          unsetAddedOn();
        } else {
          setAddedOn((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case URL:
        return getUrl();

      case MASTER_AFFILIATE_ID:
        return Long.valueOf(getMasterAffiliateId());

      case ADDED_ON:
        return Long.valueOf(getAddedOn());

      }
      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 NAME:
        return isSetName();
      case URL:
        return isSetUrl();
      case MASTER_AFFILIATE_ID:
        return isSetMasterAffiliateId();
      case ADDED_ON:
        return isSetAddedOn();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createAffiliate_args)
        return this.equals((createAffiliate_args)that);
      return false;
    }

    public boolean equals(createAffiliate_args that) {
      if (that == null)
        return false;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_url = true && this.isSetUrl();
      boolean that_present_url = true && that.isSetUrl();
      if (this_present_url || that_present_url) {
        if (!(this_present_url && that_present_url))
          return false;
        if (!this.url.equals(that.url))
          return false;
      }

      boolean this_present_masterAffiliateId = true;
      boolean that_present_masterAffiliateId = true;
      if (this_present_masterAffiliateId || that_present_masterAffiliateId) {
        if (!(this_present_masterAffiliateId && that_present_masterAffiliateId))
          return false;
        if (this.masterAffiliateId != that.masterAffiliateId)
          return false;
      }

      boolean this_present_addedOn = true;
      boolean that_present_addedOn = true;
      if (this_present_addedOn || that_present_addedOn) {
        if (!(this_present_addedOn && that_present_addedOn))
          return false;
        if (this.addedOn != that.addedOn)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createAffiliate_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createAffiliate_args typedOther = (createAffiliate_args)other;

      lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUrl()).compareTo(typedOther.isSetUrl());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUrl()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.url, typedOther.url);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMasterAffiliateId()).compareTo(typedOther.isSetMasterAffiliateId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMasterAffiliateId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.masterAffiliateId, typedOther.masterAffiliateId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddedOn()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.name = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // URL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.url = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // MASTER_AFFILIATE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.masterAffiliateId = iprot.readI64();
              setMasterAffiliateIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ADDED_ON
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addedOn = iprot.readI64();
              setAddedOnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(this.name);
        oprot.writeFieldEnd();
      }
      if (this.url != null) {
        oprot.writeFieldBegin(URL_FIELD_DESC);
        oprot.writeString(this.url);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MASTER_AFFILIATE_ID_FIELD_DESC);
      oprot.writeI64(this.masterAffiliateId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
      oprot.writeI64(this.addedOn);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createAffiliate_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("url:");
      if (this.url == null) {
        sb.append("null");
      } else {
        sb.append(this.url);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("masterAffiliateId:");
      sb.append(this.masterAffiliateId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("addedOn:");
      sb.append(this.addedOn);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createAffiliate_result implements org.apache.thrift.TBase<createAffiliate_result, createAffiliate_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createAffiliate_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Affiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, Affiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createAffiliate_result.class, metaDataMap);
    }

    public createAffiliate_result() {
    }

    public createAffiliate_result(
      Affiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createAffiliate_result(createAffiliate_result other) {
      if (other.isSetSuccess()) {
        this.success = new Affiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public createAffiliate_result deepCopy() {
      return new createAffiliate_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public Affiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(Affiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Affiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createAffiliate_result)
        return this.equals((createAffiliate_result)that);
      return false;
    }

    public boolean equals(createAffiliate_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createAffiliate_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createAffiliate_result typedOther = (createAffiliate_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Affiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createAffiliate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliateById_args implements org.apache.thrift.TBase<getAffiliateById_args, getAffiliateById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliateById_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAffiliateById_args.class, metaDataMap);
    }

    public getAffiliateById_args() {
    }

    public getAffiliateById_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliateById_args(getAffiliateById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getAffiliateById_args deepCopy() {
      return new getAffiliateById_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliateById_args)
        return this.equals((getAffiliateById_args)that);
      return false;
    }

    public boolean equals(getAffiliateById_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliateById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliateById_args typedOther = (getAffiliateById_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliateById_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliateById_result implements org.apache.thrift.TBase<getAffiliateById_result, getAffiliateById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliateById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Affiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, Affiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAffiliateById_result.class, metaDataMap);
    }

    public getAffiliateById_result() {
    }

    public getAffiliateById_result(
      Affiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliateById_result(getAffiliateById_result other) {
      if (other.isSetSuccess()) {
        this.success = new Affiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getAffiliateById_result deepCopy() {
      return new getAffiliateById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public Affiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(Affiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Affiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliateById_result)
        return this.equals((getAffiliateById_result)that);
      return false;
    }

    public boolean equals(getAffiliateById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliateById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliateById_result typedOther = (getAffiliateById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Affiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliateById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliateByName_args implements org.apache.thrift.TBase<getAffiliateByName_args, getAffiliateByName_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliateByName_args");

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String name; // 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 {
      NAME((short)1, "name");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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(getAffiliateByName_args.class, metaDataMap);
    }

    public getAffiliateByName_args() {
    }

    public getAffiliateByName_args(
      String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliateByName_args(getAffiliateByName_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

    public getAffiliateByName_args deepCopy() {
      return new getAffiliateByName_args(this);
    }

    @Override
    public void clear() {
      this.name = null;
    }

    public String getName() {
      return this.name;
    }

    public void setName(String name) {
      this.name = name;
    }

    public void unsetName() {
      this.name = null;
    }

    /** Returns true if field name is set (has been assigned a value) and false otherwise */
    public boolean isSetName() {
      return this.name != null;
    }

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      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 NAME:
        return isSetName();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliateByName_args)
        return this.equals((getAffiliateByName_args)that);
      return false;
    }

    public boolean equals(getAffiliateByName_args that) {
      if (that == null)
        return false;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliateByName_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliateByName_args typedOther = (getAffiliateByName_args)other;

      lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.name = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(this.name);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliateByName_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliateByName_result implements org.apache.thrift.TBase<getAffiliateByName_result, getAffiliateByName_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliateByName_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Affiliate success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, Affiliate.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAffiliateByName_result.class, metaDataMap);
    }

    public getAffiliateByName_result() {
    }

    public getAffiliateByName_result(
      Affiliate success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliateByName_result(getAffiliateByName_result other) {
      if (other.isSetSuccess()) {
        this.success = new Affiliate(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getAffiliateByName_result deepCopy() {
      return new getAffiliateByName_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public Affiliate getSuccess() {
      return this.success;
    }

    public void setSuccess(Affiliate success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Affiliate)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliateByName_result)
        return this.equals((getAffiliateByName_result)that);
      return false;
    }

    public boolean equals(getAffiliateByName_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliateByName_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliateByName_result typedOther = (getAffiliateByName_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Affiliate();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliateByName_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackerById_args implements org.apache.thrift.TBase<getTrackerById_args, getTrackerById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackerById_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackerById_args.class, metaDataMap);
    }

    public getTrackerById_args() {
    }

    public getTrackerById_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackerById_args(getTrackerById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getTrackerById_args deepCopy() {
      return new getTrackerById_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackerById_args)
        return this.equals((getTrackerById_args)that);
      return false;
    }

    public boolean equals(getTrackerById_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackerById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackerById_args typedOther = (getTrackerById_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackerById_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackerById_result implements org.apache.thrift.TBase<getTrackerById_result, getTrackerById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackerById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Tracker success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, Tracker.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackerById_result.class, metaDataMap);
    }

    public getTrackerById_result() {
    }

    public getTrackerById_result(
      Tracker success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackerById_result(getTrackerById_result other) {
      if (other.isSetSuccess()) {
        this.success = new Tracker(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getTrackerById_result deepCopy() {
      return new getTrackerById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public Tracker getSuccess() {
      return this.success;
    }

    public void setSuccess(Tracker success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Tracker)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackerById_result)
        return this.equals((getTrackerById_result)that);
      return false;
    }

    public boolean equals(getTrackerById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackerById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackerById_result typedOther = (getTrackerById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Tracker();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackerById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliatesByMasterAffiliate_args implements org.apache.thrift.TBase<getAffiliatesByMasterAffiliate_args, getAffiliatesByMasterAffiliate_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliatesByMasterAffiliate_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAffiliatesByMasterAffiliate_args.class, metaDataMap);
    }

    public getAffiliatesByMasterAffiliate_args() {
    }

    public getAffiliatesByMasterAffiliate_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliatesByMasterAffiliate_args(getAffiliatesByMasterAffiliate_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getAffiliatesByMasterAffiliate_args deepCopy() {
      return new getAffiliatesByMasterAffiliate_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliatesByMasterAffiliate_args)
        return this.equals((getAffiliatesByMasterAffiliate_args)that);
      return false;
    }

    public boolean equals(getAffiliatesByMasterAffiliate_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliatesByMasterAffiliate_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliatesByMasterAffiliate_args typedOther = (getAffiliatesByMasterAffiliate_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliatesByMasterAffiliate_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAffiliatesByMasterAffiliate_result implements org.apache.thrift.TBase<getAffiliatesByMasterAffiliate_result, getAffiliatesByMasterAffiliate_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAffiliatesByMasterAffiliate_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Affiliate> success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Affiliate.class))));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAffiliatesByMasterAffiliate_result.class, metaDataMap);
    }

    public getAffiliatesByMasterAffiliate_result() {
    }

    public getAffiliatesByMasterAffiliate_result(
      List<Affiliate> success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAffiliatesByMasterAffiliate_result(getAffiliatesByMasterAffiliate_result other) {
      if (other.isSetSuccess()) {
        List<Affiliate> __this__success = new ArrayList<Affiliate>();
        for (Affiliate other_element : other.success) {
          __this__success.add(new Affiliate(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getAffiliatesByMasterAffiliate_result deepCopy() {
      return new getAffiliatesByMasterAffiliate_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Affiliate> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Affiliate elem) {
      if (this.success == null) {
        this.success = new ArrayList<Affiliate>();
      }
      this.success.add(elem);
    }

    public List<Affiliate> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Affiliate> success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Affiliate>)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAffiliatesByMasterAffiliate_result)
        return this.equals((getAffiliatesByMasterAffiliate_result)that);
      return false;
    }

    public boolean equals(getAffiliatesByMasterAffiliate_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAffiliatesByMasterAffiliate_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAffiliatesByMasterAffiliate_result typedOther = (getAffiliatesByMasterAffiliate_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list71 = iprot.readListBegin();
                this.success = new ArrayList<Affiliate>(_list71.size);
                for (int _i72 = 0; _i72 < _list71.size; ++_i72)
                {
                  Affiliate _elem73; // required
                  _elem73 = new Affiliate();
                  _elem73.read(iprot);
                  this.success.add(_elem73);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Affiliate _iter74 : this.success)
          {
            _iter74.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAffiliatesByMasterAffiliate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addTrackLog_args implements org.apache.thrift.TBase<addTrackLog_args, addTrackLog_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addTrackLog_args");

    private static final org.apache.thrift.protocol.TField AFFILIATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("affiliateId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("event", org.apache.thrift.protocol.TType.I32, (short)3);
    private static final org.apache.thrift.protocol.TField URL_FIELD_DESC = new org.apache.thrift.protocol.TField("url", org.apache.thrift.protocol.TType.STRING, (short)4);
    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)5);
    private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)6);

    private long affiliateId; // required
    private long userId; // required
    private TrackLogType event; // required
    private String url; // required
    private String data; // required
    private long addedOn; // 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 {
      AFFILIATE_ID((short)1, "affiliateId"),
      USER_ID((short)2, "userId"),
      /**
       * 
       * @see TrackLogType
       */
      EVENT((short)3, "event"),
      URL((short)4, "url"),
      DATA((short)5, "data"),
      ADDED_ON((short)6, "addedOn");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AFFILIATE_ID
            return AFFILIATE_ID;
          case 2: // USER_ID
            return USER_ID;
          case 3: // EVENT
            return EVENT;
          case 4: // URL
            return URL;
          case 5: // DATA
            return DATA;
          case 6: // ADDED_ON
            return ADDED_ON;
          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 __AFFILIATEID_ISSET_ID = 0;
    private static final int __USERID_ISSET_ID = 1;
    private static final int __ADDEDON_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    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.AFFILIATE_ID, new org.apache.thrift.meta_data.FieldMetaData("affiliateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.EVENT, new org.apache.thrift.meta_data.FieldMetaData("event", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TrackLogType.class)));
      tmpMap.put(_Fields.URL, new org.apache.thrift.meta_data.FieldMetaData("url", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addTrackLog_args.class, metaDataMap);
    }

    public addTrackLog_args() {
    }

    public addTrackLog_args(
      long affiliateId,
      long userId,
      TrackLogType event,
      String url,
      String data,
      long addedOn)
    {
      this();
      this.affiliateId = affiliateId;
      setAffiliateIdIsSet(true);
      this.userId = userId;
      setUserIdIsSet(true);
      this.event = event;
      this.url = url;
      this.data = data;
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addTrackLog_args(addTrackLog_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.affiliateId = other.affiliateId;
      this.userId = other.userId;
      if (other.isSetEvent()) {
        this.event = other.event;
      }
      if (other.isSetUrl()) {
        this.url = other.url;
      }
      if (other.isSetData()) {
        this.data = other.data;
      }
      this.addedOn = other.addedOn;
    }

    public addTrackLog_args deepCopy() {
      return new addTrackLog_args(this);
    }

    @Override
    public void clear() {
      setAffiliateIdIsSet(false);
      this.affiliateId = 0;
      setUserIdIsSet(false);
      this.userId = 0;
      this.event = null;
      this.url = null;
      this.data = null;
      setAddedOnIsSet(false);
      this.addedOn = 0;
    }

    public long getAffiliateId() {
      return this.affiliateId;
    }

    public void setAffiliateId(long affiliateId) {
      this.affiliateId = affiliateId;
      setAffiliateIdIsSet(true);
    }

    public void unsetAffiliateId() {
      __isset_bit_vector.clear(__AFFILIATEID_ISSET_ID);
    }

    /** Returns true if field affiliateId is set (has been assigned a value) and false otherwise */
    public boolean isSetAffiliateId() {
      return __isset_bit_vector.get(__AFFILIATEID_ISSET_ID);
    }

    public void setAffiliateIdIsSet(boolean value) {
      __isset_bit_vector.set(__AFFILIATEID_ISSET_ID, value);
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    /**
     * 
     * @see TrackLogType
     */
    public TrackLogType getEvent() {
      return this.event;
    }

    /**
     * 
     * @see TrackLogType
     */
    public void setEvent(TrackLogType event) {
      this.event = event;
    }

    public void unsetEvent() {
      this.event = null;
    }

    /** Returns true if field event is set (has been assigned a value) and false otherwise */
    public boolean isSetEvent() {
      return this.event != null;
    }

    public void setEventIsSet(boolean value) {
      if (!value) {
        this.event = null;
      }
    }

    public String getUrl() {
      return this.url;
    }

    public void setUrl(String url) {
      this.url = url;
    }

    public void unsetUrl() {
      this.url = null;
    }

    /** Returns true if field url is set (has been assigned a value) and false otherwise */
    public boolean isSetUrl() {
      return this.url != null;
    }

    public void setUrlIsSet(boolean value) {
      if (!value) {
        this.url = null;
      }
    }

    public String getData() {
      return this.data;
    }

    public void setData(String data) {
      this.data = data;
    }

    public void unsetData() {
      this.data = null;
    }

    /** Returns true if field data is set (has been assigned a value) and false otherwise */
    public boolean isSetData() {
      return this.data != null;
    }

    public void setDataIsSet(boolean value) {
      if (!value) {
        this.data = null;
      }
    }

    public long getAddedOn() {
      return this.addedOn;
    }

    public void setAddedOn(long addedOn) {
      this.addedOn = addedOn;
      setAddedOnIsSet(true);
    }

    public void unsetAddedOn() {
      __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
    }

    /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
    public boolean isSetAddedOn() {
      return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
    }

    public void setAddedOnIsSet(boolean value) {
      __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AFFILIATE_ID:
        if (value == null) {
          unsetAffiliateId();
        } else {
          setAffiliateId((Long)value);
        }
        break;

      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case EVENT:
        if (value == null) {
          unsetEvent();
        } else {
          setEvent((TrackLogType)value);
        }
        break;

      case URL:
        if (value == null) {
          unsetUrl();
        } else {
          setUrl((String)value);
        }
        break;

      case DATA:
        if (value == null) {
          unsetData();
        } else {
          setData((String)value);
        }
        break;

      case ADDED_ON:
        if (value == null) {
          unsetAddedOn();
        } else {
          setAddedOn((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AFFILIATE_ID:
        return Long.valueOf(getAffiliateId());

      case USER_ID:
        return Long.valueOf(getUserId());

      case EVENT:
        return getEvent();

      case URL:
        return getUrl();

      case DATA:
        return getData();

      case ADDED_ON:
        return Long.valueOf(getAddedOn());

      }
      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 AFFILIATE_ID:
        return isSetAffiliateId();
      case USER_ID:
        return isSetUserId();
      case EVENT:
        return isSetEvent();
      case URL:
        return isSetUrl();
      case DATA:
        return isSetData();
      case ADDED_ON:
        return isSetAddedOn();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addTrackLog_args)
        return this.equals((addTrackLog_args)that);
      return false;
    }

    public boolean equals(addTrackLog_args that) {
      if (that == null)
        return false;

      boolean this_present_affiliateId = true;
      boolean that_present_affiliateId = true;
      if (this_present_affiliateId || that_present_affiliateId) {
        if (!(this_present_affiliateId && that_present_affiliateId))
          return false;
        if (this.affiliateId != that.affiliateId)
          return false;
      }

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_event = true && this.isSetEvent();
      boolean that_present_event = true && that.isSetEvent();
      if (this_present_event || that_present_event) {
        if (!(this_present_event && that_present_event))
          return false;
        if (!this.event.equals(that.event))
          return false;
      }

      boolean this_present_url = true && this.isSetUrl();
      boolean that_present_url = true && that.isSetUrl();
      if (this_present_url || that_present_url) {
        if (!(this_present_url && that_present_url))
          return false;
        if (!this.url.equals(that.url))
          return false;
      }

      boolean this_present_data = true && this.isSetData();
      boolean that_present_data = true && that.isSetData();
      if (this_present_data || that_present_data) {
        if (!(this_present_data && that_present_data))
          return false;
        if (!this.data.equals(that.data))
          return false;
      }

      boolean this_present_addedOn = true;
      boolean that_present_addedOn = true;
      if (this_present_addedOn || that_present_addedOn) {
        if (!(this_present_addedOn && that_present_addedOn))
          return false;
        if (this.addedOn != that.addedOn)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addTrackLog_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addTrackLog_args typedOther = (addTrackLog_args)other;

      lastComparison = Boolean.valueOf(isSetAffiliateId()).compareTo(typedOther.isSetAffiliateId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAffiliateId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.affiliateId, typedOther.affiliateId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEvent()).compareTo(typedOther.isSetEvent());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEvent()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.event, typedOther.event);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUrl()).compareTo(typedOther.isSetUrl());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUrl()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.url, typedOther.url);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetData()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddedOn()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AFFILIATE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.affiliateId = iprot.readI64();
              setAffiliateIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // EVENT
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.event = TrackLogType.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // URL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.url = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // DATA
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.data = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // ADDED_ON
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addedOn = iprot.readI64();
              setAddedOnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(AFFILIATE_ID_FIELD_DESC);
      oprot.writeI64(this.affiliateId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      if (this.event != null) {
        oprot.writeFieldBegin(EVENT_FIELD_DESC);
        oprot.writeI32(this.event.getValue());
        oprot.writeFieldEnd();
      }
      if (this.url != null) {
        oprot.writeFieldBegin(URL_FIELD_DESC);
        oprot.writeString(this.url);
        oprot.writeFieldEnd();
      }
      if (this.data != null) {
        oprot.writeFieldBegin(DATA_FIELD_DESC);
        oprot.writeString(this.data);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
      oprot.writeI64(this.addedOn);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addTrackLog_args(");
      boolean first = true;

      sb.append("affiliateId:");
      sb.append(this.affiliateId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("event:");
      if (this.event == null) {
        sb.append("null");
      } else {
        sb.append(this.event);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("url:");
      if (this.url == null) {
        sb.append("null");
      } else {
        sb.append(this.url);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("data:");
      if (this.data == null) {
        sb.append("null");
      } else {
        sb.append(this.data);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("addedOn:");
      sb.append(this.addedOn);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addTrackLog_result implements org.apache.thrift.TBase<addTrackLog_result, addTrackLog_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addTrackLog_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addTrackLog_result.class, metaDataMap);
    }

    public addTrackLog_result() {
    }

    public addTrackLog_result(
      long success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addTrackLog_result(addTrackLog_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public addTrackLog_result deepCopy() {
      return new addTrackLog_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.utx = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addTrackLog_result)
        return this.equals((addTrackLog_result)that);
      return false;
    }

    public boolean equals(addTrackLog_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addTrackLog_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addTrackLog_result typedOther = (addTrackLog_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addTrackLog_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogById_args implements org.apache.thrift.TBase<getTrackLogById_args, getTrackLogById_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogById_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long id; // 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 {
      ID((short)1, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          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 __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogById_args.class, metaDataMap);
    }

    public getTrackLogById_args() {
    }

    public getTrackLogById_args(
      long id)
    {
      this();
      this.id = id;
      setIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogById_args(getTrackLogById_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
    }

    public getTrackLogById_args deepCopy() {
      return new getTrackLogById_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      }
      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 ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogById_args)
        return this.equals((getTrackLogById_args)that);
      return false;
    }

    public boolean equals(getTrackLogById_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogById_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogById_args typedOther = (getTrackLogById_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogById_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogById_result implements org.apache.thrift.TBase<getTrackLogById_result, getTrackLogById_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogById_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private TrackLog success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          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, TrackLog.class)));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogById_result.class, metaDataMap);
    }

    public getTrackLogById_result() {
    }

    public getTrackLogById_result(
      TrackLog success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogById_result(getTrackLogById_result other) {
      if (other.isSetSuccess()) {
        this.success = new TrackLog(other.success);
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getTrackLogById_result deepCopy() {
      return new getTrackLogById_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public TrackLog getSuccess() {
      return this.success;
    }

    public void setSuccess(TrackLog success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TrackLog)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogById_result)
        return this.equals((getTrackLogById_result)that);
      return false;
    }

    public boolean equals(getTrackLogById_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogById_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogById_result typedOther = (getTrackLogById_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new TrackLog();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogById_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogsByAffiliate_args implements org.apache.thrift.TBase<getTrackLogsByAffiliate_args, getTrackLogsByAffiliate_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogsByAffiliate_args");

    private static final org.apache.thrift.protocol.TField AFFILIATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("affiliateId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)3);

    private long affiliateId; // required
    private long startDate; // required
    private long endDate; // 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 {
      AFFILIATE_ID((short)1, "affiliateId"),
      START_DATE((short)2, "startDate"),
      END_DATE((short)3, "endDate");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AFFILIATE_ID
            return AFFILIATE_ID;
          case 2: // START_DATE
            return START_DATE;
          case 3: // END_DATE
            return END_DATE;
          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 __AFFILIATEID_ISSET_ID = 0;
    private static final int __STARTDATE_ISSET_ID = 1;
    private static final int __ENDDATE_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    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.AFFILIATE_ID, new org.apache.thrift.meta_data.FieldMetaData("affiliateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogsByAffiliate_args.class, metaDataMap);
    }

    public getTrackLogsByAffiliate_args() {
    }

    public getTrackLogsByAffiliate_args(
      long affiliateId,
      long startDate,
      long endDate)
    {
      this();
      this.affiliateId = affiliateId;
      setAffiliateIdIsSet(true);
      this.startDate = startDate;
      setStartDateIsSet(true);
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogsByAffiliate_args(getTrackLogsByAffiliate_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.affiliateId = other.affiliateId;
      this.startDate = other.startDate;
      this.endDate = other.endDate;
    }

    public getTrackLogsByAffiliate_args deepCopy() {
      return new getTrackLogsByAffiliate_args(this);
    }

    @Override
    public void clear() {
      setAffiliateIdIsSet(false);
      this.affiliateId = 0;
      setStartDateIsSet(false);
      this.startDate = 0;
      setEndDateIsSet(false);
      this.endDate = 0;
    }

    public long getAffiliateId() {
      return this.affiliateId;
    }

    public void setAffiliateId(long affiliateId) {
      this.affiliateId = affiliateId;
      setAffiliateIdIsSet(true);
    }

    public void unsetAffiliateId() {
      __isset_bit_vector.clear(__AFFILIATEID_ISSET_ID);
    }

    /** Returns true if field affiliateId is set (has been assigned a value) and false otherwise */
    public boolean isSetAffiliateId() {
      return __isset_bit_vector.get(__AFFILIATEID_ISSET_ID);
    }

    public void setAffiliateIdIsSet(boolean value) {
      __isset_bit_vector.set(__AFFILIATEID_ISSET_ID, value);
    }

    public long getStartDate() {
      return this.startDate;
    }

    public void setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

    public void unsetStartDate() {
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
    }

    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
    public boolean isSetStartDate() {
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
    }

    public void setStartDateIsSet(boolean value) {
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
    }

    public long getEndDate() {
      return this.endDate;
    }

    public void setEndDate(long endDate) {
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    public void unsetEndDate() {
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
    }

    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
    public boolean isSetEndDate() {
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
    }

    public void setEndDateIsSet(boolean value) {
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AFFILIATE_ID:
        if (value == null) {
          unsetAffiliateId();
        } else {
          setAffiliateId((Long)value);
        }
        break;

      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      case END_DATE:
        if (value == null) {
          unsetEndDate();
        } else {
          setEndDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AFFILIATE_ID:
        return Long.valueOf(getAffiliateId());

      case START_DATE:
        return Long.valueOf(getStartDate());

      case END_DATE:
        return Long.valueOf(getEndDate());

      }
      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 AFFILIATE_ID:
        return isSetAffiliateId();
      case START_DATE:
        return isSetStartDate();
      case END_DATE:
        return isSetEndDate();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogsByAffiliate_args)
        return this.equals((getTrackLogsByAffiliate_args)that);
      return false;
    }

    public boolean equals(getTrackLogsByAffiliate_args that) {
      if (that == null)
        return false;

      boolean this_present_affiliateId = true;
      boolean that_present_affiliateId = true;
      if (this_present_affiliateId || that_present_affiliateId) {
        if (!(this_present_affiliateId && that_present_affiliateId))
          return false;
        if (this.affiliateId != that.affiliateId)
          return false;
      }

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      boolean this_present_endDate = true;
      boolean that_present_endDate = true;
      if (this_present_endDate || that_present_endDate) {
        if (!(this_present_endDate && that_present_endDate))
          return false;
        if (this.endDate != that.endDate)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogsByAffiliate_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogsByAffiliate_args typedOther = (getTrackLogsByAffiliate_args)other;

      lastComparison = Boolean.valueOf(isSetAffiliateId()).compareTo(typedOther.isSetAffiliateId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAffiliateId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.affiliateId, typedOther.affiliateId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStartDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AFFILIATE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.affiliateId = iprot.readI64();
              setAffiliateIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // START_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.startDate = iprot.readI64();
              setStartDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // END_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.endDate = iprot.readI64();
              setEndDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(AFFILIATE_ID_FIELD_DESC);
      oprot.writeI64(this.affiliateId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
      oprot.writeI64(this.startDate);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
      oprot.writeI64(this.endDate);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogsByAffiliate_args(");
      boolean first = true;

      sb.append("affiliateId:");
      sb.append(this.affiliateId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("startDate:");
      sb.append(this.startDate);
      first = false;
      if (!first) sb.append(", ");
      sb.append("endDate:");
      sb.append(this.endDate);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogsByAffiliate_result implements org.apache.thrift.TBase<getTrackLogsByAffiliate_result, getTrackLogsByAffiliate_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogsByAffiliate_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<TrackLog> success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TrackLog.class))));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogsByAffiliate_result.class, metaDataMap);
    }

    public getTrackLogsByAffiliate_result() {
    }

    public getTrackLogsByAffiliate_result(
      List<TrackLog> success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogsByAffiliate_result(getTrackLogsByAffiliate_result other) {
      if (other.isSetSuccess()) {
        List<TrackLog> __this__success = new ArrayList<TrackLog>();
        for (TrackLog other_element : other.success) {
          __this__success.add(new TrackLog(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getTrackLogsByAffiliate_result deepCopy() {
      return new getTrackLogsByAffiliate_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<TrackLog> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(TrackLog elem) {
      if (this.success == null) {
        this.success = new ArrayList<TrackLog>();
      }
      this.success.add(elem);
    }

    public List<TrackLog> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<TrackLog> success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<TrackLog>)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogsByAffiliate_result)
        return this.equals((getTrackLogsByAffiliate_result)that);
      return false;
    }

    public boolean equals(getTrackLogsByAffiliate_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogsByAffiliate_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogsByAffiliate_result typedOther = (getTrackLogsByAffiliate_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list75 = iprot.readListBegin();
                this.success = new ArrayList<TrackLog>(_list75.size);
                for (int _i76 = 0; _i76 < _list75.size; ++_i76)
                {
                  TrackLog _elem77; // required
                  _elem77 = new TrackLog();
                  _elem77.read(iprot);
                  this.success.add(_elem77);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (TrackLog _iter78 : this.success)
          {
            _iter78.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogsByAffiliate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogsByUser_args implements org.apache.thrift.TBase<getTrackLogsByUser_args, getTrackLogsByUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogsByUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogsByUser_args.class, metaDataMap);
    }

    public getTrackLogsByUser_args() {
    }

    public getTrackLogsByUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogsByUser_args(getTrackLogsByUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getTrackLogsByUser_args deepCopy() {
      return new getTrackLogsByUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogsByUser_args)
        return this.equals((getTrackLogsByUser_args)that);
      return false;
    }

    public boolean equals(getTrackLogsByUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogsByUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogsByUser_args typedOther = (getTrackLogsByUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogsByUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogsByUser_result implements org.apache.thrift.TBase<getTrackLogsByUser_result, getTrackLogsByUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogsByUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<TrackLog> success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TrackLog.class))));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogsByUser_result.class, metaDataMap);
    }

    public getTrackLogsByUser_result() {
    }

    public getTrackLogsByUser_result(
      List<TrackLog> success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogsByUser_result(getTrackLogsByUser_result other) {
      if (other.isSetSuccess()) {
        List<TrackLog> __this__success = new ArrayList<TrackLog>();
        for (TrackLog other_element : other.success) {
          __this__success.add(new TrackLog(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getTrackLogsByUser_result deepCopy() {
      return new getTrackLogsByUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<TrackLog> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(TrackLog elem) {
      if (this.success == null) {
        this.success = new ArrayList<TrackLog>();
      }
      this.success.add(elem);
    }

    public List<TrackLog> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<TrackLog> success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<TrackLog>)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogsByUser_result)
        return this.equals((getTrackLogsByUser_result)that);
      return false;
    }

    public boolean equals(getTrackLogsByUser_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogsByUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogsByUser_result typedOther = (getTrackLogsByUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list79 = iprot.readListBegin();
                this.success = new ArrayList<TrackLog>(_list79.size);
                for (int _i80 = 0; _i80 < _list79.size; ++_i80)
                {
                  TrackLog _elem81; // required
                  _elem81 = new TrackLog();
                  _elem81.read(iprot);
                  this.success.add(_elem81);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (TrackLog _iter82 : this.success)
          {
            _iter82.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogsByUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogs_args implements org.apache.thrift.TBase<getTrackLogs_args, getTrackLogs_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogs_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("event", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField URL_FIELD_DESC = new org.apache.thrift.protocol.TField("url", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long userId; // required
    private String event; // required
    private String url; // 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 {
      USER_ID((short)1, "userId"),
      EVENT((short)2, "event"),
      URL((short)3, "url");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // EVENT
            return EVENT;
          case 3: // URL
            return URL;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.EVENT, new org.apache.thrift.meta_data.FieldMetaData("event", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URL, new org.apache.thrift.meta_data.FieldMetaData("url", 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(getTrackLogs_args.class, metaDataMap);
    }

    public getTrackLogs_args() {
    }

    public getTrackLogs_args(
      long userId,
      String event,
      String url)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.event = event;
      this.url = url;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogs_args(getTrackLogs_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      if (other.isSetEvent()) {
        this.event = other.event;
      }
      if (other.isSetUrl()) {
        this.url = other.url;
      }
    }

    public getTrackLogs_args deepCopy() {
      return new getTrackLogs_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      this.event = null;
      this.url = null;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public String getEvent() {
      return this.event;
    }

    public void setEvent(String event) {
      this.event = event;
    }

    public void unsetEvent() {
      this.event = null;
    }

    /** Returns true if field event is set (has been assigned a value) and false otherwise */
    public boolean isSetEvent() {
      return this.event != null;
    }

    public void setEventIsSet(boolean value) {
      if (!value) {
        this.event = null;
      }
    }

    public String getUrl() {
      return this.url;
    }

    public void setUrl(String url) {
      this.url = url;
    }

    public void unsetUrl() {
      this.url = null;
    }

    /** Returns true if field url is set (has been assigned a value) and false otherwise */
    public boolean isSetUrl() {
      return this.url != null;
    }

    public void setUrlIsSet(boolean value) {
      if (!value) {
        this.url = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case EVENT:
        if (value == null) {
          unsetEvent();
        } else {
          setEvent((String)value);
        }
        break;

      case URL:
        if (value == null) {
          unsetUrl();
        } else {
          setUrl((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case EVENT:
        return getEvent();

      case URL:
        return getUrl();

      }
      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 USER_ID:
        return isSetUserId();
      case EVENT:
        return isSetEvent();
      case URL:
        return isSetUrl();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogs_args)
        return this.equals((getTrackLogs_args)that);
      return false;
    }

    public boolean equals(getTrackLogs_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_event = true && this.isSetEvent();
      boolean that_present_event = true && that.isSetEvent();
      if (this_present_event || that_present_event) {
        if (!(this_present_event && that_present_event))
          return false;
        if (!this.event.equals(that.event))
          return false;
      }

      boolean this_present_url = true && this.isSetUrl();
      boolean that_present_url = true && that.isSetUrl();
      if (this_present_url || that_present_url) {
        if (!(this_present_url && that_present_url))
          return false;
        if (!this.url.equals(that.url))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogs_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogs_args typedOther = (getTrackLogs_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEvent()).compareTo(typedOther.isSetEvent());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEvent()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.event, typedOther.event);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUrl()).compareTo(typedOther.isSetUrl());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUrl()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.url, typedOther.url);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // EVENT
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.event = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // URL
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.url = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      if (this.event != null) {
        oprot.writeFieldBegin(EVENT_FIELD_DESC);
        oprot.writeString(this.event);
        oprot.writeFieldEnd();
      }
      if (this.url != null) {
        oprot.writeFieldBegin(URL_FIELD_DESC);
        oprot.writeString(this.url);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogs_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("event:");
      if (this.event == null) {
        sb.append("null");
      } else {
        sb.append(this.event);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("url:");
      if (this.url == null) {
        sb.append("null");
      } else {
        sb.append(this.url);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrackLogs_result implements org.apache.thrift.TBase<getTrackLogs_result, getTrackLogs_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrackLogs_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField UTX_FIELD_DESC = new org.apache.thrift.protocol.TField("utx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<TrackLog> success; // required
    private UserAffiliateException utx; // 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"),
      UTX((short)1, "utx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // UTX
            return UTX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TrackLog.class))));
      tmpMap.put(_Fields.UTX, new org.apache.thrift.meta_data.FieldMetaData("utx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrackLogs_result.class, metaDataMap);
    }

    public getTrackLogs_result() {
    }

    public getTrackLogs_result(
      List<TrackLog> success,
      UserAffiliateException utx)
    {
      this();
      this.success = success;
      this.utx = utx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrackLogs_result(getTrackLogs_result other) {
      if (other.isSetSuccess()) {
        List<TrackLog> __this__success = new ArrayList<TrackLog>();
        for (TrackLog other_element : other.success) {
          __this__success.add(new TrackLog(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUtx()) {
        this.utx = new UserAffiliateException(other.utx);
      }
    }

    public getTrackLogs_result deepCopy() {
      return new getTrackLogs_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.utx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<TrackLog> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(TrackLog elem) {
      if (this.success == null) {
        this.success = new ArrayList<TrackLog>();
      }
      this.success.add(elem);
    }

    public List<TrackLog> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<TrackLog> success) {
      this.success = success;
    }

    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 UserAffiliateException getUtx() {
      return this.utx;
    }

    public void setUtx(UserAffiliateException utx) {
      this.utx = utx;
    }

    public void unsetUtx() {
      this.utx = null;
    }

    /** Returns true if field utx is set (has been assigned a value) and false otherwise */
    public boolean isSetUtx() {
      return this.utx != null;
    }

    public void setUtxIsSet(boolean value) {
      if (!value) {
        this.utx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<TrackLog>)value);
        }
        break;

      case UTX:
        if (value == null) {
          unsetUtx();
        } else {
          setUtx((UserAffiliateException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case UTX:
        return getUtx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case UTX:
        return isSetUtx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrackLogs_result)
        return this.equals((getTrackLogs_result)that);
      return false;
    }

    public boolean equals(getTrackLogs_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_utx = true && this.isSetUtx();
      boolean that_present_utx = true && that.isSetUtx();
      if (this_present_utx || that_present_utx) {
        if (!(this_present_utx && that_present_utx))
          return false;
        if (!this.utx.equals(that.utx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrackLogs_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrackLogs_result typedOther = (getTrackLogs_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUtx()).compareTo(typedOther.isSetUtx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUtx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.utx, typedOther.utx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list83 = iprot.readListBegin();
                this.success = new ArrayList<TrackLog>(_list83.size);
                for (int _i84 = 0; _i84 < _list83.size; ++_i84)
                {
                  TrackLog _elem85; // required
                  _elem85 = new TrackLog();
                  _elem85.read(iprot);
                  this.success.add(_elem85);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // UTX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.utx = new UserAffiliateException();
              this.utx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (TrackLog _iter86 : this.success)
          {
            _iter86.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUtx()) {
        oprot.writeFieldBegin(UTX_FIELD_DESC);
        this.utx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrackLogs_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("utx:");
      if (this.utx == null) {
        sb.append("null");
      } else {
        sb.append(this.utx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCurrentCart_args implements org.apache.thrift.TBase<getCurrentCart_args, getCurrentCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentCart_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
    }

    public getCurrentCart_args() {
    }

    public getCurrentCart_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCurrentCart_args(getCurrentCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getCurrentCart_args deepCopy() {
      return new getCurrentCart_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCurrentCart_args)
        return this.equals((getCurrentCart_args)that);
      return false;
    }

    public boolean equals(getCurrentCart_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCurrentCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCurrentCart_args typedOther = (getCurrentCart_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCurrentCart_result implements org.apache.thrift.TBase<getCurrentCart_result, getCurrentCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentCart_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Cart success; // required
    private ShoppingCartException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          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, Cart.class)));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
    }

    public getCurrentCart_result() {
    }

    public getCurrentCart_result(
      Cart success,
      ShoppingCartException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCurrentCart_result(getCurrentCart_result other) {
      if (other.isSetSuccess()) {
        this.success = new Cart(other.success);
      }
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public getCurrentCart_result deepCopy() {
      return new getCurrentCart_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public Cart getSuccess() {
      return this.success;
    }

    public void setSuccess(Cart success) {
      this.success = success;
    }

    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 ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Cart)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCurrentCart_result)
        return this.equals((getCurrentCart_result)that);
      return false;
    }

    public boolean equals(getCurrentCart_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCurrentCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCurrentCart_result typedOther = (getCurrentCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Cart();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCart_args implements org.apache.thrift.TBase<getCart_args, getCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
    }

    public getCart_args() {
    }

    public getCart_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCart_args(getCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public getCart_args deepCopy() {
      return new getCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCart_args)
        return this.equals((getCart_args)that);
      return false;
    }

    public boolean equals(getCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCart_args typedOther = (getCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCart_result implements org.apache.thrift.TBase<getCart_result, getCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCart_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Cart success; // required
    private ShoppingCartException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          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, Cart.class)));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
    }

    public getCart_result() {
    }

    public getCart_result(
      Cart success,
      ShoppingCartException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCart_result(getCart_result other) {
      if (other.isSetSuccess()) {
        this.success = new Cart(other.success);
      }
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public getCart_result deepCopy() {
      return new getCart_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public Cart getSuccess() {
      return this.success;
    }

    public void setSuccess(Cart success) {
      this.success = success;
    }

    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 ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Cart)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCart_result)
        return this.equals((getCart_result)that);
      return false;
    }

    public boolean equals(getCart_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCart_result typedOther = (getCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Cart();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCart_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartsByTime_args implements org.apache.thrift.TBase<getCartsByTime_args, getCartsByTime_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartsByTime_args");

    private static final org.apache.thrift.protocol.TField FROM_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("from_time", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TO_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("to_time", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)3);

    private long from_time; // required
    private long to_time; // required
    private CartStatus status; // 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 {
      FROM_TIME((short)1, "from_time"),
      TO_TIME((short)2, "to_time"),
      /**
       * 
       * @see CartStatus
       */
      STATUS((short)3, "status");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // FROM_TIME
            return FROM_TIME;
          case 2: // TO_TIME
            return TO_TIME;
          case 3: // STATUS
            return STATUS;
          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 __FROM_TIME_ISSET_ID = 0;
    private static final int __TO_TIME_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("from_time", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("to_time", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CartStatus.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
    }

    public getCartsByTime_args() {
    }

    public getCartsByTime_args(
      long from_time,
      long to_time,
      CartStatus status)
    {
      this();
      this.from_time = from_time;
      setFrom_timeIsSet(true);
      this.to_time = to_time;
      setTo_timeIsSet(true);
      this.status = status;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartsByTime_args(getCartsByTime_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.from_time = other.from_time;
      this.to_time = other.to_time;
      if (other.isSetStatus()) {
        this.status = other.status;
      }
    }

    public getCartsByTime_args deepCopy() {
      return new getCartsByTime_args(this);
    }

    @Override
    public void clear() {
      setFrom_timeIsSet(false);
      this.from_time = 0;
      setTo_timeIsSet(false);
      this.to_time = 0;
      this.status = null;
    }

    public long getFrom_time() {
      return this.from_time;
    }

    public void setFrom_time(long from_time) {
      this.from_time = from_time;
      setFrom_timeIsSet(true);
    }

    public void unsetFrom_time() {
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
    }

    /** Returns true if field from_time is set (has been assigned a value) and false otherwise */
    public boolean isSetFrom_time() {
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
    }

    public void setFrom_timeIsSet(boolean value) {
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
    }

    public long getTo_time() {
      return this.to_time;
    }

    public void setTo_time(long to_time) {
      this.to_time = to_time;
      setTo_timeIsSet(true);
    }

    public void unsetTo_time() {
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
    }

    /** Returns true if field to_time is set (has been assigned a value) and false otherwise */
    public boolean isSetTo_time() {
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
    }

    public void setTo_timeIsSet(boolean value) {
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
    }

    /**
     * 
     * @see CartStatus
     */
    public CartStatus getStatus() {
      return this.status;
    }

    /**
     * 
     * @see CartStatus
     */
    public void setStatus(CartStatus status) {
      this.status = status;
    }

    public void unsetStatus() {
      this.status = null;
    }

    /** Returns true if field status is set (has been assigned a value) and false otherwise */
    public boolean isSetStatus() {
      return this.status != null;
    }

    public void setStatusIsSet(boolean value) {
      if (!value) {
        this.status = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case FROM_TIME:
        if (value == null) {
          unsetFrom_time();
        } else {
          setFrom_time((Long)value);
        }
        break;

      case TO_TIME:
        if (value == null) {
          unsetTo_time();
        } else {
          setTo_time((Long)value);
        }
        break;

      case STATUS:
        if (value == null) {
          unsetStatus();
        } else {
          setStatus((CartStatus)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case FROM_TIME:
        return Long.valueOf(getFrom_time());

      case TO_TIME:
        return Long.valueOf(getTo_time());

      case STATUS:
        return getStatus();

      }
      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 FROM_TIME:
        return isSetFrom_time();
      case TO_TIME:
        return isSetTo_time();
      case STATUS:
        return isSetStatus();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCartsByTime_args)
        return this.equals((getCartsByTime_args)that);
      return false;
    }

    public boolean equals(getCartsByTime_args that) {
      if (that == null)
        return false;

      boolean this_present_from_time = true;
      boolean that_present_from_time = true;
      if (this_present_from_time || that_present_from_time) {
        if (!(this_present_from_time && that_present_from_time))
          return false;
        if (this.from_time != that.from_time)
          return false;
      }

      boolean this_present_to_time = true;
      boolean that_present_to_time = true;
      if (this_present_to_time || that_present_to_time) {
        if (!(this_present_to_time && that_present_to_time))
          return false;
        if (this.to_time != that.to_time)
          return false;
      }

      boolean this_present_status = true && this.isSetStatus();
      boolean that_present_status = true && that.isSetStatus();
      if (this_present_status || that_present_status) {
        if (!(this_present_status && that_present_status))
          return false;
        if (!this.status.equals(that.status))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCartsByTime_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartsByTime_args typedOther = (getCartsByTime_args)other;

      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(typedOther.isSetFrom_time());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFrom_time()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.from_time, typedOther.from_time);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(typedOther.isSetTo_time());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTo_time()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.to_time, typedOther.to_time);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStatus()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // FROM_TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.from_time = iprot.readI64();
              setFrom_timeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TO_TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.to_time = iprot.readI64();
              setTo_timeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // STATUS
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.status = CartStatus.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
      oprot.writeI64(this.from_time);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
      oprot.writeI64(this.to_time);
      oprot.writeFieldEnd();
      if (this.status != null) {
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
        oprot.writeI32(this.status.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
      boolean first = true;

      sb.append("from_time:");
      sb.append(this.from_time);
      first = false;
      if (!first) sb.append(", ");
      sb.append("to_time:");
      sb.append(this.to_time);
      first = false;
      if (!first) sb.append(", ");
      sb.append("status:");
      if (this.status == null) {
        sb.append("null");
      } else {
        sb.append(this.status);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartsByTime_result implements org.apache.thrift.TBase<getCartsByTime_result, getCartsByTime_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartsByTime_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Cart> success; // required
    private ShoppingCartException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Cart.class))));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
    }

    public getCartsByTime_result() {
    }

    public getCartsByTime_result(
      List<Cart> success,
      ShoppingCartException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartsByTime_result(getCartsByTime_result other) {
      if (other.isSetSuccess()) {
        List<Cart> __this__success = new ArrayList<Cart>();
        for (Cart other_element : other.success) {
          __this__success.add(new Cart(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public getCartsByTime_result deepCopy() {
      return new getCartsByTime_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Cart> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Cart elem) {
      if (this.success == null) {
        this.success = new ArrayList<Cart>();
      }
      this.success.add(elem);
    }

    public List<Cart> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Cart> success) {
      this.success = success;
    }

    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 ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Cart>)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCartsByTime_result)
        return this.equals((getCartsByTime_result)that);
      return false;
    }

    public boolean equals(getCartsByTime_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCartsByTime_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartsByTime_result typedOther = (getCartsByTime_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list87 = iprot.readListBegin();
                this.success = new ArrayList<Cart>(_list87.size);
                for (int _i88 = 0; _i88 < _list87.size; ++_i88)
                {
                  Cart _elem89; // required
                  _elem89 = new Cart();
                  _elem89.read(iprot);
                  this.success.add(_elem89);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Cart _iter90 : this.success)
          {
            _iter90.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addItemToCart_args implements org.apache.thrift.TBase<addItemToCart_args, addItemToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemToCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)4);

    private long cartId; // required
    private long itemId; // required
    private long quantity; // required
    private long sourceId; // 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 {
      CART_ID((short)1, "cartId"),
      ITEM_ID((short)2, "itemId"),
      QUANTITY((short)3, "quantity"),
      SOURCE_ID((short)4, "sourceId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          case 3: // QUANTITY
            return QUANTITY;
          case 4: // SOURCE_ID
            return SOURCE_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __ITEMID_ISSET_ID = 1;
    private static final int __QUANTITY_ISSET_ID = 2;
    private static final int __SOURCEID_ISSET_ID = 3;
    private BitSet __isset_bit_vector = new BitSet(4);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
    }

    public addItemToCart_args() {
    }

    public addItemToCart_args(
      long cartId,
      long itemId,
      long quantity,
      long sourceId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addItemToCart_args(addItemToCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.itemId = other.itemId;
      this.quantity = other.quantity;
      this.sourceId = other.sourceId;
    }

    public addItemToCart_args deepCopy() {
      return new addItemToCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setItemIdIsSet(false);
      this.itemId = 0;
      setQuantityIsSet(false);
      this.quantity = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getQuantity() {
      return this.quantity;
    }

    public void setQuantity(long quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case ITEM_ID:
        return Long.valueOf(getItemId());

      case QUANTITY:
        return Long.valueOf(getQuantity());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      }
      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 CART_ID:
        return isSetCartId();
      case ITEM_ID:
        return isSetItemId();
      case QUANTITY:
        return isSetQuantity();
      case SOURCE_ID:
        return isSetSourceId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addItemToCart_args)
        return this.equals((addItemToCart_args)that);
      return false;
    }

    public boolean equals(addItemToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addItemToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addItemToCart_args typedOther = (addItemToCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.quantity = iprot.readI64();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeI64(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addItemToCart_result implements org.apache.thrift.TBase<addItemToCart_result, addItemToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemToCart_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private String success; // required
    private ShoppingCartException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
    }

    public addItemToCart_result() {
    }

    public addItemToCart_result(
      String success,
      ShoppingCartException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addItemToCart_result(addItemToCart_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public addItemToCart_result deepCopy() {
      return new addItemToCart_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    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 ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addItemToCart_result)
        return this.equals((addItemToCart_result)that);
      return false;
    }

    public boolean equals(addItemToCart_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addItemToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addItemToCart_result typedOther = (addItemToCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromCart_args implements org.apache.thrift.TBase<deleteItemFromCart_args, deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long cartId; // required
    private long itemId; // 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 {
      CART_ID((short)1, "cartId"),
      ITEM_ID((short)2, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __ITEMID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
    }

    public deleteItemFromCart_args() {
    }

    public deleteItemFromCart_args(
      long cartId,
      long itemId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.itemId = other.itemId;
    }

    public deleteItemFromCart_args deepCopy() {
      return new deleteItemFromCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      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 CART_ID:
        return isSetCartId();
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromCart_args)
        return this.equals((deleteItemFromCart_args)that);
      return false;
    }

    public boolean equals(deleteItemFromCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromCart_result implements org.apache.thrift.TBase<deleteItemFromCart_result, deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromCart_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
    }

    public deleteItemFromCart_result() {
    }

    public deleteItemFromCart_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public deleteItemFromCart_result deepCopy() {
      return new deleteItemFromCart_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromCart_result)
        return this.equals((deleteItemFromCart_result)that);
      return false;
    }

    public boolean equals(deleteItemFromCart_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addAddressToCart_args implements org.apache.thrift.TBase<addAddressToCart_args, addAddressToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAddressToCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long cartId; // required
    private long addressId; // 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 {
      CART_ID((short)1, "cartId"),
      ADDRESS_ID((short)2, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // ADDRESS_ID
            return ADDRESS_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __ADDRESSID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
    }

    public addAddressToCart_args() {
    }

    public addAddressToCart_args(
      long cartId,
      long addressId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addAddressToCart_args(addAddressToCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.addressId = other.addressId;
    }

    public addAddressToCart_args deepCopy() {
      return new addAddressToCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 CART_ID:
        return isSetCartId();
      case ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addAddressToCart_args)
        return this.equals((addAddressToCart_args)that);
      return false;
    }

    public boolean equals(addAddressToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addAddressToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addAddressToCart_args typedOther = (addAddressToCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addAddressToCart_result implements org.apache.thrift.TBase<addAddressToCart_result, addAddressToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAddressToCart_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
    }

    public addAddressToCart_result() {
    }

    public addAddressToCart_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addAddressToCart_result(addAddressToCart_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public addAddressToCart_result deepCopy() {
      return new addAddressToCart_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addAddressToCart_result)
        return this.equals((addAddressToCart_result)that);
      return false;
    }

    public boolean equals(addAddressToCart_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addAddressToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addAddressToCart_result typedOther = (addAddressToCart_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addStoreToCart_args implements org.apache.thrift.TBase<addStoreToCart_args, addStoreToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addStoreToCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long cartId; // required
    private long storeId; // 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 {
      CART_ID((short)1, "cartId"),
      STORE_ID((short)2, "storeId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // STORE_ID
            return STORE_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __STOREID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addStoreToCart_args.class, metaDataMap);
    }

    public addStoreToCart_args() {
    }

    public addStoreToCart_args(
      long cartId,
      long storeId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.storeId = storeId;
      setStoreIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addStoreToCart_args(addStoreToCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.storeId = other.storeId;
    }

    public addStoreToCart_args deepCopy() {
      return new addStoreToCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setStoreIdIsSet(false);
      this.storeId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getStoreId() {
      return this.storeId;
    }

    public void setStoreId(long storeId) {
      this.storeId = storeId;
      setStoreIdIsSet(true);
    }

    public void unsetStoreId() {
      __isset_bit_vector.clear(__STOREID_ISSET_ID);
    }

    /** Returns true if field storeId is set (has been assigned a value) and false otherwise */
    public boolean isSetStoreId() {
      return __isset_bit_vector.get(__STOREID_ISSET_ID);
    }

    public void setStoreIdIsSet(boolean value) {
      __isset_bit_vector.set(__STOREID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case STORE_ID:
        if (value == null) {
          unsetStoreId();
        } else {
          setStoreId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case STORE_ID:
        return Long.valueOf(getStoreId());

      }
      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 CART_ID:
        return isSetCartId();
      case STORE_ID:
        return isSetStoreId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addStoreToCart_args)
        return this.equals((addStoreToCart_args)that);
      return false;
    }

    public boolean equals(addStoreToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_storeId = true;
      boolean that_present_storeId = true;
      if (this_present_storeId || that_present_storeId) {
        if (!(this_present_storeId && that_present_storeId))
          return false;
        if (this.storeId != that.storeId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addStoreToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addStoreToCart_args typedOther = (addStoreToCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStoreId()).compareTo(typedOther.isSetStoreId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStoreId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // STORE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.storeId = iprot.readI64();
              setStoreIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(STORE_ID_FIELD_DESC);
      oprot.writeI64(this.storeId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addStoreToCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("storeId:");
      sb.append(this.storeId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addStoreToCart_result implements org.apache.thrift.TBase<addStoreToCart_result, addStoreToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addStoreToCart_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addStoreToCart_result.class, metaDataMap);
    }

    public addStoreToCart_result() {
    }

    public addStoreToCart_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addStoreToCart_result(addStoreToCart_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public addStoreToCart_result deepCopy() {
      return new addStoreToCart_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addStoreToCart_result)
        return this.equals((addStoreToCart_result)that);
      return false;
    }

    public boolean equals(addStoreToCart_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addStoreToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addStoreToCart_result typedOther = (addStoreToCart_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addStoreToCart_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class applyCouponToCart_args implements org.apache.thrift.TBase<applyCouponToCart_args, applyCouponToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCouponToCart_args");

    private static final org.apache.thrift.protocol.TField CART_FIELD_DESC = new org.apache.thrift.protocol.TField("cart", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);

    private Cart cart; // required
    private String couponCode; // 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 {
      CART((short)1, "cart"),
      COUPON_CODE((short)2, "couponCode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART
            return CART;
          case 2: // COUPON_CODE
            return COUPON_CODE;
          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.CART, new org.apache.thrift.meta_data.FieldMetaData("cart", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Cart.class)));
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", 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(applyCouponToCart_args.class, metaDataMap);
    }

    public applyCouponToCart_args() {
    }

    public applyCouponToCart_args(
      Cart cart,
      String couponCode)
    {
      this();
      this.cart = cart;
      this.couponCode = couponCode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public applyCouponToCart_args(applyCouponToCart_args other) {
      if (other.isSetCart()) {
        this.cart = new Cart(other.cart);
      }
      if (other.isSetCouponCode()) {
        this.couponCode = other.couponCode;
      }
    }

    public applyCouponToCart_args deepCopy() {
      return new applyCouponToCart_args(this);
    }

    @Override
    public void clear() {
      this.cart = null;
      this.couponCode = null;
    }

    public Cart getCart() {
      return this.cart;
    }

    public void setCart(Cart cart) {
      this.cart = cart;
    }

    public void unsetCart() {
      this.cart = null;
    }

    /** Returns true if field cart is set (has been assigned a value) and false otherwise */
    public boolean isSetCart() {
      return this.cart != null;
    }

    public void setCartIsSet(boolean value) {
      if (!value) {
        this.cart = null;
      }
    }

    public String getCouponCode() {
      return this.couponCode;
    }

    public void setCouponCode(String couponCode) {
      this.couponCode = couponCode;
    }

    public void unsetCouponCode() {
      this.couponCode = null;
    }

    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
    public boolean isSetCouponCode() {
      return this.couponCode != null;
    }

    public void setCouponCodeIsSet(boolean value) {
      if (!value) {
        this.couponCode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART:
        if (value == null) {
          unsetCart();
        } else {
          setCart((Cart)value);
        }
        break;

      case COUPON_CODE:
        if (value == null) {
          unsetCouponCode();
        } else {
          setCouponCode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART:
        return getCart();

      case COUPON_CODE:
        return getCouponCode();

      }
      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 CART:
        return isSetCart();
      case COUPON_CODE:
        return isSetCouponCode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof applyCouponToCart_args)
        return this.equals((applyCouponToCart_args)that);
      return false;
    }

    public boolean equals(applyCouponToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cart = true && this.isSetCart();
      boolean that_present_cart = true && that.isSetCart();
      if (this_present_cart || that_present_cart) {
        if (!(this_present_cart && that_present_cart))
          return false;
        if (!this.cart.equals(that.cart))
          return false;
      }

      boolean this_present_couponCode = true && this.isSetCouponCode();
      boolean that_present_couponCode = true && that.isSetCouponCode();
      if (this_present_couponCode || that_present_couponCode) {
        if (!(this_present_couponCode && that_present_couponCode))
          return false;
        if (!this.couponCode.equals(that.couponCode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(applyCouponToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      applyCouponToCart_args typedOther = (applyCouponToCart_args)other;

      lastComparison = Boolean.valueOf(isSetCart()).compareTo(typedOther.isSetCart());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCart()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cart, typedOther.cart);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCouponCode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cart = new Cart();
              this.cart.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // COUPON_CODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.couponCode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.cart != null) {
        oprot.writeFieldBegin(CART_FIELD_DESC);
        this.cart.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.couponCode != null) {
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
        oprot.writeString(this.couponCode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("applyCouponToCart_args(");
      boolean first = true;

      sb.append("cart:");
      if (this.cart == null) {
        sb.append("null");
      } else {
        sb.append(this.cart);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("couponCode:");
      if (this.couponCode == null) {
        sb.append("null");
      } else {
        sb.append(this.couponCode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class applyCouponToCart_result implements org.apache.thrift.TBase<applyCouponToCart_result, applyCouponToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCouponToCart_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(applyCouponToCart_result.class, metaDataMap);
    }

    public applyCouponToCart_result() {
    }

    public applyCouponToCart_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public applyCouponToCart_result(applyCouponToCart_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public applyCouponToCart_result deepCopy() {
      return new applyCouponToCart_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof applyCouponToCart_result)
        return this.equals((applyCouponToCart_result)that);
      return false;
    }

    public boolean equals(applyCouponToCart_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(applyCouponToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      applyCouponToCart_result typedOther = (applyCouponToCart_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("applyCouponToCart_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeCoupon_args implements org.apache.thrift.TBase<removeCoupon_args, removeCoupon_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeCoupon_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeCoupon_args.class, metaDataMap);
    }

    public removeCoupon_args() {
    }

    public removeCoupon_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeCoupon_args(removeCoupon_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public removeCoupon_args deepCopy() {
      return new removeCoupon_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeCoupon_args)
        return this.equals((removeCoupon_args)that);
      return false;
    }

    public boolean equals(removeCoupon_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeCoupon_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeCoupon_args typedOther = (removeCoupon_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeCoupon_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class removeCoupon_result implements org.apache.thrift.TBase<removeCoupon_result, removeCoupon_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeCoupon_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeCoupon_result.class, metaDataMap);
    }

    public removeCoupon_result() {
    }

    public removeCoupon_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeCoupon_result(removeCoupon_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public removeCoupon_result deepCopy() {
      return new removeCoupon_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof removeCoupon_result)
        return this.equals((removeCoupon_result)that);
      return false;
    }

    public boolean equals(removeCoupon_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(removeCoupon_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      removeCoupon_result typedOther = (removeCoupon_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("removeCoupon_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteDiscountsFromCart_args implements org.apache.thrift.TBase<deleteDiscountsFromCart_args, deleteDiscountsFromCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteDiscountsFromCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteDiscountsFromCart_args.class, metaDataMap);
    }

    public deleteDiscountsFromCart_args() {
    }

    public deleteDiscountsFromCart_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteDiscountsFromCart_args(deleteDiscountsFromCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public deleteDiscountsFromCart_args deepCopy() {
      return new deleteDiscountsFromCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteDiscountsFromCart_args)
        return this.equals((deleteDiscountsFromCart_args)that);
      return false;
    }

    public boolean equals(deleteDiscountsFromCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteDiscountsFromCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteDiscountsFromCart_args typedOther = (deleteDiscountsFromCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteDiscountsFromCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteDiscountsFromCart_result implements org.apache.thrift.TBase<deleteDiscountsFromCart_result, deleteDiscountsFromCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteDiscountsFromCart_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteDiscountsFromCart_result.class, metaDataMap);
    }

    public deleteDiscountsFromCart_result() {
    }

    public deleteDiscountsFromCart_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteDiscountsFromCart_result(deleteDiscountsFromCart_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public deleteDiscountsFromCart_result deepCopy() {
      return new deleteDiscountsFromCart_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteDiscountsFromCart_result)
        return this.equals((deleteDiscountsFromCart_result)that);
      return false;
    }

    public boolean equals(deleteDiscountsFromCart_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteDiscountsFromCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteDiscountsFromCart_result typedOther = (deleteDiscountsFromCart_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteDiscountsFromCart_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class saveDiscounts_args implements org.apache.thrift.TBase<saveDiscounts_args, saveDiscounts_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("saveDiscounts_args");

    private static final org.apache.thrift.protocol.TField DISCOUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("discounts", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Discount> discounts; // 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 {
      DISCOUNTS((short)1, "discounts");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // DISCOUNTS
            return DISCOUNTS;
          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.DISCOUNTS, new org.apache.thrift.meta_data.FieldMetaData("discounts", 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, Discount.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(saveDiscounts_args.class, metaDataMap);
    }

    public saveDiscounts_args() {
    }

    public saveDiscounts_args(
      List<Discount> discounts)
    {
      this();
      this.discounts = discounts;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public saveDiscounts_args(saveDiscounts_args other) {
      if (other.isSetDiscounts()) {
        List<Discount> __this__discounts = new ArrayList<Discount>();
        for (Discount other_element : other.discounts) {
          __this__discounts.add(new Discount(other_element));
        }
        this.discounts = __this__discounts;
      }
    }

    public saveDiscounts_args deepCopy() {
      return new saveDiscounts_args(this);
    }

    @Override
    public void clear() {
      this.discounts = null;
    }

    public int getDiscountsSize() {
      return (this.discounts == null) ? 0 : this.discounts.size();
    }

    public java.util.Iterator<Discount> getDiscountsIterator() {
      return (this.discounts == null) ? null : this.discounts.iterator();
    }

    public void addToDiscounts(Discount elem) {
      if (this.discounts == null) {
        this.discounts = new ArrayList<Discount>();
      }
      this.discounts.add(elem);
    }

    public List<Discount> getDiscounts() {
      return this.discounts;
    }

    public void setDiscounts(List<Discount> discounts) {
      this.discounts = discounts;
    }

    public void unsetDiscounts() {
      this.discounts = null;
    }

    /** Returns true if field discounts is set (has been assigned a value) and false otherwise */
    public boolean isSetDiscounts() {
      return this.discounts != null;
    }

    public void setDiscountsIsSet(boolean value) {
      if (!value) {
        this.discounts = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DISCOUNTS:
        if (value == null) {
          unsetDiscounts();
        } else {
          setDiscounts((List<Discount>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DISCOUNTS:
        return getDiscounts();

      }
      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 DISCOUNTS:
        return isSetDiscounts();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof saveDiscounts_args)
        return this.equals((saveDiscounts_args)that);
      return false;
    }

    public boolean equals(saveDiscounts_args that) {
      if (that == null)
        return false;

      boolean this_present_discounts = true && this.isSetDiscounts();
      boolean that_present_discounts = true && that.isSetDiscounts();
      if (this_present_discounts || that_present_discounts) {
        if (!(this_present_discounts && that_present_discounts))
          return false;
        if (!this.discounts.equals(that.discounts))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(saveDiscounts_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      saveDiscounts_args typedOther = (saveDiscounts_args)other;

      lastComparison = Boolean.valueOf(isSetDiscounts()).compareTo(typedOther.isSetDiscounts());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDiscounts()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discounts, typedOther.discounts);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // DISCOUNTS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list91 = iprot.readListBegin();
                this.discounts = new ArrayList<Discount>(_list91.size);
                for (int _i92 = 0; _i92 < _list91.size; ++_i92)
                {
                  Discount _elem93; // required
                  _elem93 = new Discount();
                  _elem93.read(iprot);
                  this.discounts.add(_elem93);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.discounts != null) {
        oprot.writeFieldBegin(DISCOUNTS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.discounts.size()));
          for (Discount _iter94 : this.discounts)
          {
            _iter94.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("saveDiscounts_args(");
      boolean first = true;

      sb.append("discounts:");
      if (this.discounts == null) {
        sb.append("null");
      } else {
        sb.append(this.discounts);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class saveDiscounts_result implements org.apache.thrift.TBase<saveDiscounts_result, saveDiscounts_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("saveDiscounts_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ShoppingCartException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(saveDiscounts_result.class, metaDataMap);
    }

    public saveDiscounts_result() {
    }

    public saveDiscounts_result(
      ShoppingCartException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public saveDiscounts_result(saveDiscounts_result other) {
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public saveDiscounts_result deepCopy() {
      return new saveDiscounts_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof saveDiscounts_result)
        return this.equals((saveDiscounts_result)that);
      return false;
    }

    public boolean equals(saveDiscounts_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(saveDiscounts_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      saveDiscounts_result typedOther = (saveDiscounts_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("saveDiscounts_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createOrders_args implements org.apache.thrift.TBase<createOrders_args, createOrders_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createOrders_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SESSION_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionSource", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField SESSION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionStartTime", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField FIRST_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSource", org.apache.thrift.protocol.TType.STRING, (short)4);
    private static final org.apache.thrift.protocol.TField FIRST_SOURCE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSourceTime", org.apache.thrift.protocol.TType.I64, (short)5);
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)6);
    private static final org.apache.thrift.protocol.TField SCHEME_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("schemeId", org.apache.thrift.protocol.TType.I64, (short)7);
    private static final org.apache.thrift.protocol.TField ORDER_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("orderSource", org.apache.thrift.protocol.TType.I64, (short)8);
    private static final org.apache.thrift.protocol.TField SELF_PICKUP_FIELD_DESC = new org.apache.thrift.protocol.TField("selfPickup", org.apache.thrift.protocol.TType.BOOL, (short)9);

    private long cartId; // required
    private String sessionSource; // required
    private long sessionStartTime; // required
    private String firstSource; // required
    private long firstSourceTime; // required
    private long userId; // required
    private long schemeId; // required
    private long orderSource; // required
    private boolean selfPickup; // 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 {
      CART_ID((short)1, "cartId"),
      SESSION_SOURCE((short)2, "sessionSource"),
      SESSION_START_TIME((short)3, "sessionStartTime"),
      FIRST_SOURCE((short)4, "firstSource"),
      FIRST_SOURCE_TIME((short)5, "firstSourceTime"),
      USER_ID((short)6, "userId"),
      SCHEME_ID((short)7, "schemeId"),
      ORDER_SOURCE((short)8, "orderSource"),
      SELF_PICKUP((short)9, "selfPickup");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // SESSION_SOURCE
            return SESSION_SOURCE;
          case 3: // SESSION_START_TIME
            return SESSION_START_TIME;
          case 4: // FIRST_SOURCE
            return FIRST_SOURCE;
          case 5: // FIRST_SOURCE_TIME
            return FIRST_SOURCE_TIME;
          case 6: // USER_ID
            return USER_ID;
          case 7: // SCHEME_ID
            return SCHEME_ID;
          case 8: // ORDER_SOURCE
            return ORDER_SOURCE;
          case 9: // SELF_PICKUP
            return SELF_PICKUP;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SESSIONSTARTTIME_ISSET_ID = 1;
    private static final int __FIRSTSOURCETIME_ISSET_ID = 2;
    private static final int __USERID_ISSET_ID = 3;
    private static final int __SCHEMEID_ISSET_ID = 4;
    private static final int __ORDERSOURCE_ISSET_ID = 5;
    private static final int __SELFPICKUP_ISSET_ID = 6;
    private BitSet __isset_bit_vector = new BitSet(7);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SESSION_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("sessionSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SESSION_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sessionStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FIRST_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("firstSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FIRST_SOURCE_TIME, new org.apache.thrift.meta_data.FieldMetaData("firstSourceTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SCHEME_ID, new org.apache.thrift.meta_data.FieldMetaData("schemeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("orderSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SELF_PICKUP, new org.apache.thrift.meta_data.FieldMetaData("selfPickup", 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(createOrders_args.class, metaDataMap);
    }

    public createOrders_args() {
    }

    public createOrders_args(
      long cartId,
      String sessionSource,
      long sessionStartTime,
      String firstSource,
      long firstSourceTime,
      long userId,
      long schemeId,
      long orderSource,
      boolean selfPickup)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.sessionSource = sessionSource;
      this.sessionStartTime = sessionStartTime;
      setSessionStartTimeIsSet(true);
      this.firstSource = firstSource;
      this.firstSourceTime = firstSourceTime;
      setFirstSourceTimeIsSet(true);
      this.userId = userId;
      setUserIdIsSet(true);
      this.schemeId = schemeId;
      setSchemeIdIsSet(true);
      this.orderSource = orderSource;
      setOrderSourceIsSet(true);
      this.selfPickup = selfPickup;
      setSelfPickupIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createOrders_args(createOrders_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      if (other.isSetSessionSource()) {
        this.sessionSource = other.sessionSource;
      }
      this.sessionStartTime = other.sessionStartTime;
      if (other.isSetFirstSource()) {
        this.firstSource = other.firstSource;
      }
      this.firstSourceTime = other.firstSourceTime;
      this.userId = other.userId;
      this.schemeId = other.schemeId;
      this.orderSource = other.orderSource;
      this.selfPickup = other.selfPickup;
    }

    public createOrders_args deepCopy() {
      return new createOrders_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      this.sessionSource = null;
      setSessionStartTimeIsSet(false);
      this.sessionStartTime = 0;
      this.firstSource = null;
      setFirstSourceTimeIsSet(false);
      this.firstSourceTime = 0;
      setUserIdIsSet(false);
      this.userId = 0;
      setSchemeIdIsSet(false);
      this.schemeId = 0;
      setOrderSourceIsSet(false);
      this.orderSource = 0;
      setSelfPickupIsSet(false);
      this.selfPickup = false;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public String getSessionSource() {
      return this.sessionSource;
    }

    public void setSessionSource(String sessionSource) {
      this.sessionSource = sessionSource;
    }

    public void unsetSessionSource() {
      this.sessionSource = null;
    }

    /** Returns true if field sessionSource is set (has been assigned a value) and false otherwise */
    public boolean isSetSessionSource() {
      return this.sessionSource != null;
    }

    public void setSessionSourceIsSet(boolean value) {
      if (!value) {
        this.sessionSource = null;
      }
    }

    public long getSessionStartTime() {
      return this.sessionStartTime;
    }

    public void setSessionStartTime(long sessionStartTime) {
      this.sessionStartTime = sessionStartTime;
      setSessionStartTimeIsSet(true);
    }

    public void unsetSessionStartTime() {
      __isset_bit_vector.clear(__SESSIONSTARTTIME_ISSET_ID);
    }

    /** Returns true if field sessionStartTime is set (has been assigned a value) and false otherwise */
    public boolean isSetSessionStartTime() {
      return __isset_bit_vector.get(__SESSIONSTARTTIME_ISSET_ID);
    }

    public void setSessionStartTimeIsSet(boolean value) {
      __isset_bit_vector.set(__SESSIONSTARTTIME_ISSET_ID, value);
    }

    public String getFirstSource() {
      return this.firstSource;
    }

    public void setFirstSource(String firstSource) {
      this.firstSource = firstSource;
    }

    public void unsetFirstSource() {
      this.firstSource = null;
    }

    /** Returns true if field firstSource is set (has been assigned a value) and false otherwise */
    public boolean isSetFirstSource() {
      return this.firstSource != null;
    }

    public void setFirstSourceIsSet(boolean value) {
      if (!value) {
        this.firstSource = null;
      }
    }

    public long getFirstSourceTime() {
      return this.firstSourceTime;
    }

    public void setFirstSourceTime(long firstSourceTime) {
      this.firstSourceTime = firstSourceTime;
      setFirstSourceTimeIsSet(true);
    }

    public void unsetFirstSourceTime() {
      __isset_bit_vector.clear(__FIRSTSOURCETIME_ISSET_ID);
    }

    /** Returns true if field firstSourceTime is set (has been assigned a value) and false otherwise */
    public boolean isSetFirstSourceTime() {
      return __isset_bit_vector.get(__FIRSTSOURCETIME_ISSET_ID);
    }

    public void setFirstSourceTimeIsSet(boolean value) {
      __isset_bit_vector.set(__FIRSTSOURCETIME_ISSET_ID, value);
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getSchemeId() {
      return this.schemeId;
    }

    public void setSchemeId(long schemeId) {
      this.schemeId = schemeId;
      setSchemeIdIsSet(true);
    }

    public void unsetSchemeId() {
      __isset_bit_vector.clear(__SCHEMEID_ISSET_ID);
    }

    /** Returns true if field schemeId is set (has been assigned a value) and false otherwise */
    public boolean isSetSchemeId() {
      return __isset_bit_vector.get(__SCHEMEID_ISSET_ID);
    }

    public void setSchemeIdIsSet(boolean value) {
      __isset_bit_vector.set(__SCHEMEID_ISSET_ID, value);
    }

    public long getOrderSource() {
      return this.orderSource;
    }

    public void setOrderSource(long orderSource) {
      this.orderSource = orderSource;
      setOrderSourceIsSet(true);
    }

    public void unsetOrderSource() {
      __isset_bit_vector.clear(__ORDERSOURCE_ISSET_ID);
    }

    /** Returns true if field orderSource is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderSource() {
      return __isset_bit_vector.get(__ORDERSOURCE_ISSET_ID);
    }

    public void setOrderSourceIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERSOURCE_ISSET_ID, value);
    }

    public boolean isSelfPickup() {
      return this.selfPickup;
    }

    public void setSelfPickup(boolean selfPickup) {
      this.selfPickup = selfPickup;
      setSelfPickupIsSet(true);
    }

    public void unsetSelfPickup() {
      __isset_bit_vector.clear(__SELFPICKUP_ISSET_ID);
    }

    /** Returns true if field selfPickup is set (has been assigned a value) and false otherwise */
    public boolean isSetSelfPickup() {
      return __isset_bit_vector.get(__SELFPICKUP_ISSET_ID);
    }

    public void setSelfPickupIsSet(boolean value) {
      __isset_bit_vector.set(__SELFPICKUP_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case SESSION_SOURCE:
        if (value == null) {
          unsetSessionSource();
        } else {
          setSessionSource((String)value);
        }
        break;

      case SESSION_START_TIME:
        if (value == null) {
          unsetSessionStartTime();
        } else {
          setSessionStartTime((Long)value);
        }
        break;

      case FIRST_SOURCE:
        if (value == null) {
          unsetFirstSource();
        } else {
          setFirstSource((String)value);
        }
        break;

      case FIRST_SOURCE_TIME:
        if (value == null) {
          unsetFirstSourceTime();
        } else {
          setFirstSourceTime((Long)value);
        }
        break;

      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case SCHEME_ID:
        if (value == null) {
          unsetSchemeId();
        } else {
          setSchemeId((Long)value);
        }
        break;

      case ORDER_SOURCE:
        if (value == null) {
          unsetOrderSource();
        } else {
          setOrderSource((Long)value);
        }
        break;

      case SELF_PICKUP:
        if (value == null) {
          unsetSelfPickup();
        } else {
          setSelfPickup((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case SESSION_SOURCE:
        return getSessionSource();

      case SESSION_START_TIME:
        return Long.valueOf(getSessionStartTime());

      case FIRST_SOURCE:
        return getFirstSource();

      case FIRST_SOURCE_TIME:
        return Long.valueOf(getFirstSourceTime());

      case USER_ID:
        return Long.valueOf(getUserId());

      case SCHEME_ID:
        return Long.valueOf(getSchemeId());

      case ORDER_SOURCE:
        return Long.valueOf(getOrderSource());

      case SELF_PICKUP:
        return Boolean.valueOf(isSelfPickup());

      }
      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 CART_ID:
        return isSetCartId();
      case SESSION_SOURCE:
        return isSetSessionSource();
      case SESSION_START_TIME:
        return isSetSessionStartTime();
      case FIRST_SOURCE:
        return isSetFirstSource();
      case FIRST_SOURCE_TIME:
        return isSetFirstSourceTime();
      case USER_ID:
        return isSetUserId();
      case SCHEME_ID:
        return isSetSchemeId();
      case ORDER_SOURCE:
        return isSetOrderSource();
      case SELF_PICKUP:
        return isSetSelfPickup();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createOrders_args)
        return this.equals((createOrders_args)that);
      return false;
    }

    public boolean equals(createOrders_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_sessionSource = true && this.isSetSessionSource();
      boolean that_present_sessionSource = true && that.isSetSessionSource();
      if (this_present_sessionSource || that_present_sessionSource) {
        if (!(this_present_sessionSource && that_present_sessionSource))
          return false;
        if (!this.sessionSource.equals(that.sessionSource))
          return false;
      }

      boolean this_present_sessionStartTime = true;
      boolean that_present_sessionStartTime = true;
      if (this_present_sessionStartTime || that_present_sessionStartTime) {
        if (!(this_present_sessionStartTime && that_present_sessionStartTime))
          return false;
        if (this.sessionStartTime != that.sessionStartTime)
          return false;
      }

      boolean this_present_firstSource = true && this.isSetFirstSource();
      boolean that_present_firstSource = true && that.isSetFirstSource();
      if (this_present_firstSource || that_present_firstSource) {
        if (!(this_present_firstSource && that_present_firstSource))
          return false;
        if (!this.firstSource.equals(that.firstSource))
          return false;
      }

      boolean this_present_firstSourceTime = true;
      boolean that_present_firstSourceTime = true;
      if (this_present_firstSourceTime || that_present_firstSourceTime) {
        if (!(this_present_firstSourceTime && that_present_firstSourceTime))
          return false;
        if (this.firstSourceTime != that.firstSourceTime)
          return false;
      }

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_schemeId = true;
      boolean that_present_schemeId = true;
      if (this_present_schemeId || that_present_schemeId) {
        if (!(this_present_schemeId && that_present_schemeId))
          return false;
        if (this.schemeId != that.schemeId)
          return false;
      }

      boolean this_present_orderSource = true;
      boolean that_present_orderSource = true;
      if (this_present_orderSource || that_present_orderSource) {
        if (!(this_present_orderSource && that_present_orderSource))
          return false;
        if (this.orderSource != that.orderSource)
          return false;
      }

      boolean this_present_selfPickup = true;
      boolean that_present_selfPickup = true;
      if (this_present_selfPickup || that_present_selfPickup) {
        if (!(this_present_selfPickup && that_present_selfPickup))
          return false;
        if (this.selfPickup != that.selfPickup)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createOrders_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createOrders_args typedOther = (createOrders_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSessionSource()).compareTo(typedOther.isSetSessionSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSessionSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionSource, typedOther.sessionSource);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSessionStartTime()).compareTo(typedOther.isSetSessionStartTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSessionStartTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionStartTime, typedOther.sessionStartTime);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFirstSource()).compareTo(typedOther.isSetFirstSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFirstSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSource, typedOther.firstSource);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFirstSourceTime()).compareTo(typedOther.isSetFirstSourceTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFirstSourceTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSourceTime, typedOther.firstSourceTime);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSchemeId()).compareTo(typedOther.isSetSchemeId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSchemeId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemeId, typedOther.schemeId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderSource()).compareTo(typedOther.isSetOrderSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderSource, typedOther.orderSource);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSelfPickup()).compareTo(typedOther.isSetSelfPickup());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSelfPickup()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.selfPickup, typedOther.selfPickup);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SESSION_SOURCE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.sessionSource = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SESSION_START_TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sessionStartTime = iprot.readI64();
              setSessionStartTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // FIRST_SOURCE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.firstSource = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // FIRST_SOURCE_TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.firstSourceTime = iprot.readI64();
              setFirstSourceTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 7: // SCHEME_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.schemeId = iprot.readI64();
              setSchemeIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 8: // ORDER_SOURCE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderSource = iprot.readI64();
              setOrderSourceIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 9: // SELF_PICKUP
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.selfPickup = iprot.readBool();
              setSelfPickupIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      if (this.sessionSource != null) {
        oprot.writeFieldBegin(SESSION_SOURCE_FIELD_DESC);
        oprot.writeString(this.sessionSource);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SESSION_START_TIME_FIELD_DESC);
      oprot.writeI64(this.sessionStartTime);
      oprot.writeFieldEnd();
      if (this.firstSource != null) {
        oprot.writeFieldBegin(FIRST_SOURCE_FIELD_DESC);
        oprot.writeString(this.firstSource);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(FIRST_SOURCE_TIME_FIELD_DESC);
      oprot.writeI64(this.firstSourceTime);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SCHEME_ID_FIELD_DESC);
      oprot.writeI64(this.schemeId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_SOURCE_FIELD_DESC);
      oprot.writeI64(this.orderSource);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SELF_PICKUP_FIELD_DESC);
      oprot.writeBool(this.selfPickup);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createOrders_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sessionSource:");
      if (this.sessionSource == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionSource);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("sessionStartTime:");
      sb.append(this.sessionStartTime);
      first = false;
      if (!first) sb.append(", ");
      sb.append("firstSource:");
      if (this.firstSource == null) {
        sb.append("null");
      } else {
        sb.append(this.firstSource);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("firstSourceTime:");
      sb.append(this.firstSourceTime);
      first = false;
      if (!first) sb.append(", ");
      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("schemeId:");
      sb.append(this.schemeId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderSource:");
      sb.append(this.orderSource);
      first = false;
      if (!first) sb.append(", ");
      sb.append("selfPickup:");
      sb.append(this.selfPickup);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class createOrders_result implements org.apache.thrift.TBase<createOrders_result, createOrders_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createOrders_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private ShoppingCartException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
    }

    public createOrders_result() {
    }

    public createOrders_result(
      long success,
      ShoppingCartException scx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createOrders_result(createOrders_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetScx()) {
        this.scx = new ShoppingCartException(other.scx);
      }
    }

    public createOrders_result deepCopy() {
      return new createOrders_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.scx = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public ShoppingCartException getScx() {
      return this.scx;
    }

    public void setScx(ShoppingCartException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createOrders_result)
        return this.equals((createOrders_result)that);
      return false;
    }

    public boolean equals(createOrders_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(createOrders_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      createOrders_result typedOther = (createOrders_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new ShoppingCartException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createOrders_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCart_args implements org.apache.thrift.TBase<validateCart_args, validateCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long cartId; // required
    private long sourceId; // 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 {
      CART_ID((short)1, "cartId"),
      SOURCE_ID((short)2, "sourceId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
    }

    public validateCart_args() {
    }

    public validateCart_args(
      long cartId,
      long sourceId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCart_args(validateCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.sourceId = other.sourceId;
    }

    public validateCart_args deepCopy() {
      return new validateCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      }
      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 CART_ID:
        return isSetCartId();
      case SOURCE_ID:
        return isSetSourceId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCart_args)
        return this.equals((validateCart_args)that);
      return false;
    }

    public boolean equals(validateCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCart_args typedOther = (validateCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCart_result implements org.apache.thrift.TBase<validateCart_result, validateCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCart_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("scex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<String> success; // required
    private ShoppingCartException scex; // 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"),
      SCEX((short)1, "scex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCEX
            return SCEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.SCEX, new org.apache.thrift.meta_data.FieldMetaData("scex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
    }

    public validateCart_result() {
    }

    public validateCart_result(
      List<String> success,
      ShoppingCartException scex)
    {
      this();
      this.success = success;
      this.scex = scex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCart_result(validateCart_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetScex()) {
        this.scex = new ShoppingCartException(other.scex);
      }
    }

    public validateCart_result deepCopy() {
      return new validateCart_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    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 ShoppingCartException getScex() {
      return this.scex;
    }

    public void setScex(ShoppingCartException scex) {
      this.scex = scex;
    }

    public void unsetScex() {
      this.scex = null;
    }

    /** Returns true if field scex is set (has been assigned a value) and false otherwise */
    public boolean isSetScex() {
      return this.scex != null;
    }

    public void setScexIsSet(boolean value) {
      if (!value) {
        this.scex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      case SCEX:
        if (value == null) {
          unsetScex();
        } else {
          setScex((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCEX:
        return getScex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCEX:
        return isSetScex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCart_result)
        return this.equals((validateCart_result)that);
      return false;
    }

    public boolean equals(validateCart_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scex = true && this.isSetScex();
      boolean that_present_scex = true && that.isSetScex();
      if (this_present_scex || that_present_scex) {
        if (!(this_present_scex && that_present_scex))
          return false;
        if (!this.scex.equals(that.scex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCart_result typedOther = (validateCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(typedOther.isSetScex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scex, typedOther.scex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list95 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list95.size);
                for (int _i96 = 0; _i96 < _list95.size; ++_i96)
                {
                  String _elem97; // required
                  _elem97 = iprot.readString();
                  this.success.add(_elem97);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scex = new ShoppingCartException();
              this.scex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter98 : this.success)
          {
            oprot.writeString(_iter98);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetScex()) {
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
        this.scex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCart_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scex:");
      if (this.scex == null) {
        sb.append("null");
      } else {
        sb.append(this.scex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartWithDealerCoupon_args implements org.apache.thrift.TBase<validateCartWithDealerCoupon_args, validateCartWithDealerCoupon_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartWithDealerCoupon_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField DEAL_COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("dealCoupon", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long cartId; // required
    private long sourceId; // required
    private String dealCoupon; // 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 {
      CART_ID((short)1, "cartId"),
      SOURCE_ID((short)2, "sourceId"),
      DEAL_COUPON((short)3, "dealCoupon");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          case 3: // DEAL_COUPON
            return DEAL_COUPON;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DEAL_COUPON, new org.apache.thrift.meta_data.FieldMetaData("dealCoupon", 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(validateCartWithDealerCoupon_args.class, metaDataMap);
    }

    public validateCartWithDealerCoupon_args() {
    }

    public validateCartWithDealerCoupon_args(
      long cartId,
      long sourceId,
      String dealCoupon)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.dealCoupon = dealCoupon;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartWithDealerCoupon_args(validateCartWithDealerCoupon_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.sourceId = other.sourceId;
      if (other.isSetDealCoupon()) {
        this.dealCoupon = other.dealCoupon;
      }
    }

    public validateCartWithDealerCoupon_args deepCopy() {
      return new validateCartWithDealerCoupon_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      this.dealCoupon = null;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public String getDealCoupon() {
      return this.dealCoupon;
    }

    public void setDealCoupon(String dealCoupon) {
      this.dealCoupon = dealCoupon;
    }

    public void unsetDealCoupon() {
      this.dealCoupon = null;
    }

    /** Returns true if field dealCoupon is set (has been assigned a value) and false otherwise */
    public boolean isSetDealCoupon() {
      return this.dealCoupon != null;
    }

    public void setDealCouponIsSet(boolean value) {
      if (!value) {
        this.dealCoupon = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case DEAL_COUPON:
        if (value == null) {
          unsetDealCoupon();
        } else {
          setDealCoupon((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case DEAL_COUPON:
        return getDealCoupon();

      }
      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 CART_ID:
        return isSetCartId();
      case SOURCE_ID:
        return isSetSourceId();
      case DEAL_COUPON:
        return isSetDealCoupon();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartWithDealerCoupon_args)
        return this.equals((validateCartWithDealerCoupon_args)that);
      return false;
    }

    public boolean equals(validateCartWithDealerCoupon_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_dealCoupon = true && this.isSetDealCoupon();
      boolean that_present_dealCoupon = true && that.isSetDealCoupon();
      if (this_present_dealCoupon || that_present_dealCoupon) {
        if (!(this_present_dealCoupon && that_present_dealCoupon))
          return false;
        if (!this.dealCoupon.equals(that.dealCoupon))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCartWithDealerCoupon_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartWithDealerCoupon_args typedOther = (validateCartWithDealerCoupon_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDealCoupon()).compareTo(typedOther.isSetDealCoupon());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDealCoupon()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealCoupon, typedOther.dealCoupon);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // DEAL_COUPON
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.dealCoupon = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      if (this.dealCoupon != null) {
        oprot.writeFieldBegin(DEAL_COUPON_FIELD_DESC);
        oprot.writeString(this.dealCoupon);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartWithDealerCoupon_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("dealCoupon:");
      if (this.dealCoupon == null) {
        sb.append("null");
      } else {
        sb.append(this.dealCoupon);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartWithDealerCoupon_result implements org.apache.thrift.TBase<validateCartWithDealerCoupon_result, validateCartWithDealerCoupon_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartWithDealerCoupon_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("scex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<String> success; // required
    private ShoppingCartException scex; // 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"),
      SCEX((short)1, "scex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCEX
            return SCEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.SCEX, new org.apache.thrift.meta_data.FieldMetaData("scex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCartWithDealerCoupon_result.class, metaDataMap);
    }

    public validateCartWithDealerCoupon_result() {
    }

    public validateCartWithDealerCoupon_result(
      List<String> success,
      ShoppingCartException scex)
    {
      this();
      this.success = success;
      this.scex = scex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartWithDealerCoupon_result(validateCartWithDealerCoupon_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetScex()) {
        this.scex = new ShoppingCartException(other.scex);
      }
    }

    public validateCartWithDealerCoupon_result deepCopy() {
      return new validateCartWithDealerCoupon_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    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 ShoppingCartException getScex() {
      return this.scex;
    }

    public void setScex(ShoppingCartException scex) {
      this.scex = scex;
    }

    public void unsetScex() {
      this.scex = null;
    }

    /** Returns true if field scex is set (has been assigned a value) and false otherwise */
    public boolean isSetScex() {
      return this.scex != null;
    }

    public void setScexIsSet(boolean value) {
      if (!value) {
        this.scex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      case SCEX:
        if (value == null) {
          unsetScex();
        } else {
          setScex((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCEX:
        return getScex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCEX:
        return isSetScex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartWithDealerCoupon_result)
        return this.equals((validateCartWithDealerCoupon_result)that);
      return false;
    }

    public boolean equals(validateCartWithDealerCoupon_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scex = true && this.isSetScex();
      boolean that_present_scex = true && that.isSetScex();
      if (this_present_scex || that_present_scex) {
        if (!(this_present_scex && that_present_scex))
          return false;
        if (!this.scex.equals(that.scex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCartWithDealerCoupon_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartWithDealerCoupon_result typedOther = (validateCartWithDealerCoupon_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(typedOther.isSetScex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scex, typedOther.scex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list99 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list99.size);
                for (int _i100 = 0; _i100 < _list99.size; ++_i100)
                {
                  String _elem101; // required
                  _elem101 = iprot.readString();
                  this.success.add(_elem101);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scex = new ShoppingCartException();
              this.scex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter102 : this.success)
          {
            oprot.writeString(_iter102);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetScex()) {
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
        this.scex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartWithDealerCoupon_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scex:");
      if (this.scex == null) {
        sb.append("null");
      } else {
        sb.append(this.scex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class mergeCart_args implements org.apache.thrift.TBase<mergeCart_args, mergeCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mergeCart_args");

    private static final org.apache.thrift.protocol.TField FROM_CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fromCartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TO_CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("toCartId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long fromCartId; // required
    private long toCartId; // 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 {
      FROM_CART_ID((short)1, "fromCartId"),
      TO_CART_ID((short)2, "toCartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // FROM_CART_ID
            return FROM_CART_ID;
          case 2: // TO_CART_ID
            return TO_CART_ID;
          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 __FROMCARTID_ISSET_ID = 0;
    private static final int __TOCARTID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.FROM_CART_ID, new org.apache.thrift.meta_data.FieldMetaData("fromCartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TO_CART_ID, new org.apache.thrift.meta_data.FieldMetaData("toCartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
    }

    public mergeCart_args() {
    }

    public mergeCart_args(
      long fromCartId,
      long toCartId)
    {
      this();
      this.fromCartId = fromCartId;
      setFromCartIdIsSet(true);
      this.toCartId = toCartId;
      setToCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public mergeCart_args(mergeCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.fromCartId = other.fromCartId;
      this.toCartId = other.toCartId;
    }

    public mergeCart_args deepCopy() {
      return new mergeCart_args(this);
    }

    @Override
    public void clear() {
      setFromCartIdIsSet(false);
      this.fromCartId = 0;
      setToCartIdIsSet(false);
      this.toCartId = 0;
    }

    public long getFromCartId() {
      return this.fromCartId;
    }

    public void setFromCartId(long fromCartId) {
      this.fromCartId = fromCartId;
      setFromCartIdIsSet(true);
    }

    public void unsetFromCartId() {
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
    }

    /** Returns true if field fromCartId is set (has been assigned a value) and false otherwise */
    public boolean isSetFromCartId() {
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
    }

    public void setFromCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
    }

    public long getToCartId() {
      return this.toCartId;
    }

    public void setToCartId(long toCartId) {
      this.toCartId = toCartId;
      setToCartIdIsSet(true);
    }

    public void unsetToCartId() {
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
    }

    /** Returns true if field toCartId is set (has been assigned a value) and false otherwise */
    public boolean isSetToCartId() {
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
    }

    public void setToCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case FROM_CART_ID:
        if (value == null) {
          unsetFromCartId();
        } else {
          setFromCartId((Long)value);
        }
        break;

      case TO_CART_ID:
        if (value == null) {
          unsetToCartId();
        } else {
          setToCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case FROM_CART_ID:
        return Long.valueOf(getFromCartId());

      case TO_CART_ID:
        return Long.valueOf(getToCartId());

      }
      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 FROM_CART_ID:
        return isSetFromCartId();
      case TO_CART_ID:
        return isSetToCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof mergeCart_args)
        return this.equals((mergeCart_args)that);
      return false;
    }

    public boolean equals(mergeCart_args that) {
      if (that == null)
        return false;

      boolean this_present_fromCartId = true;
      boolean that_present_fromCartId = true;
      if (this_present_fromCartId || that_present_fromCartId) {
        if (!(this_present_fromCartId && that_present_fromCartId))
          return false;
        if (this.fromCartId != that.fromCartId)
          return false;
      }

      boolean this_present_toCartId = true;
      boolean that_present_toCartId = true;
      if (this_present_toCartId || that_present_toCartId) {
        if (!(this_present_toCartId && that_present_toCartId))
          return false;
        if (this.toCartId != that.toCartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(mergeCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      mergeCart_args typedOther = (mergeCart_args)other;

      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(typedOther.isSetFromCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFromCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromCartId, typedOther.fromCartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(typedOther.isSetToCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetToCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toCartId, typedOther.toCartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // FROM_CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.fromCartId = iprot.readI64();
              setFromCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TO_CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.toCartId = iprot.readI64();
              setToCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
      oprot.writeI64(this.fromCartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
      oprot.writeI64(this.toCartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("mergeCart_args(");
      boolean first = true;

      sb.append("fromCartId:");
      sb.append(this.fromCartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("toCartId:");
      sb.append(this.toCartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class mergeCart_result implements org.apache.thrift.TBase<mergeCart_result, mergeCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mergeCart_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
    }

    public mergeCart_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public mergeCart_result(mergeCart_result other) {
    }

    public mergeCart_result deepCopy() {
      return new mergeCart_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 mergeCart_result)
        return this.equals((mergeCart_result)that);
      return false;
    }

    public boolean equals(mergeCart_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(mergeCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      mergeCart_result typedOther = (mergeCart_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 {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("mergeCart_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class checkOut_args implements org.apache.thrift.TBase<checkOut_args, checkOut_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkOut_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
    }

    public checkOut_args() {
    }

    public checkOut_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public checkOut_args(checkOut_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public checkOut_args deepCopy() {
      return new checkOut_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof checkOut_args)
        return this.equals((checkOut_args)that);
      return false;
    }

    public boolean equals(checkOut_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(checkOut_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      checkOut_args typedOther = (checkOut_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("checkOut_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class checkOut_result implements org.apache.thrift.TBase<checkOut_result, checkOut_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkOut_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 org.apache.thrift.protocol.TField SCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("scex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private ShoppingCartException scex; // 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"),
      SCEX((short)1, "scex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCEX
            return SCEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.SCEX, new org.apache.thrift.meta_data.FieldMetaData("scex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
    }

    public checkOut_result() {
    }

    public checkOut_result(
      boolean success,
      ShoppingCartException scex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.scex = scex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public checkOut_result(checkOut_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetScex()) {
        this.scex = new ShoppingCartException(other.scex);
      }
    }

    public checkOut_result deepCopy() {
      return new checkOut_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.scex = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public ShoppingCartException getScex() {
      return this.scex;
    }

    public void setScex(ShoppingCartException scex) {
      this.scex = scex;
    }

    public void unsetScex() {
      this.scex = null;
    }

    /** Returns true if field scex is set (has been assigned a value) and false otherwise */
    public boolean isSetScex() {
      return this.scex != null;
    }

    public void setScexIsSet(boolean value) {
      if (!value) {
        this.scex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case SCEX:
        if (value == null) {
          unsetScex();
        } else {
          setScex((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case SCEX:
        return getScex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCEX:
        return isSetScex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof checkOut_result)
        return this.equals((checkOut_result)that);
      return false;
    }

    public boolean equals(checkOut_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_scex = true && this.isSetScex();
      boolean that_present_scex = true && that.isSetScex();
      if (this_present_scex || that_present_scex) {
        if (!(this_present_scex && that_present_scex))
          return false;
        if (!this.scex.equals(that.scex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(checkOut_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      checkOut_result typedOther = (checkOut_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(typedOther.isSetScex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scex, typedOther.scex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scex = new ShoppingCartException();
              this.scex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetScex()) {
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
        this.scex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("checkOut_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("scex:");
      if (this.scex == null) {
        sb.append("null");
      } else {
        sb.append(this.scex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetCart_args implements org.apache.thrift.TBase<resetCart_args, resetCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("items", org.apache.thrift.protocol.TType.MAP, (short)2);

    private long cartId; // required
    private Map<Long,Double> items; // 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 {
      CART_ID((short)1, "cartId"),
      ITEMS((short)2, "items");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // ITEMS
            return ITEMS;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEMS, new org.apache.thrift.meta_data.FieldMetaData("items", 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.DOUBLE))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
    }

    public resetCart_args() {
    }

    public resetCart_args(
      long cartId,
      Map<Long,Double> items)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.items = items;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetCart_args(resetCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      if (other.isSetItems()) {
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {

          Long other_element_key = other_element.getKey();
          Double other_element_value = other_element.getValue();

          Long __this__items_copy_key = other_element_key;

          Double __this__items_copy_value = other_element_value;

          __this__items.put(__this__items_copy_key, __this__items_copy_value);
        }
        this.items = __this__items;
      }
    }

    public resetCart_args deepCopy() {
      return new resetCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      this.items = null;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public int getItemsSize() {
      return (this.items == null) ? 0 : this.items.size();
    }

    public void putToItems(long key, double val) {
      if (this.items == null) {
        this.items = new HashMap<Long,Double>();
      }
      this.items.put(key, val);
    }

    public Map<Long,Double> getItems() {
      return this.items;
    }

    public void setItems(Map<Long,Double> items) {
      this.items = items;
    }

    public void unsetItems() {
      this.items = null;
    }

    /** Returns true if field items is set (has been assigned a value) and false otherwise */
    public boolean isSetItems() {
      return this.items != null;
    }

    public void setItemsIsSet(boolean value) {
      if (!value) {
        this.items = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case ITEMS:
        if (value == null) {
          unsetItems();
        } else {
          setItems((Map<Long,Double>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case ITEMS:
        return getItems();

      }
      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 CART_ID:
        return isSetCartId();
      case ITEMS:
        return isSetItems();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetCart_args)
        return this.equals((resetCart_args)that);
      return false;
    }

    public boolean equals(resetCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_items = true && this.isSetItems();
      boolean that_present_items = true && that.isSetItems();
      if (this_present_items || that_present_items) {
        if (!(this_present_items && that_present_items))
          return false;
        if (!this.items.equals(that.items))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetCart_args typedOther = (resetCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(typedOther.isSetItems());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItems()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.items, typedOther.items);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEMS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map103 = iprot.readMapBegin();
                this.items = new HashMap<Long,Double>(2*_map103.size);
                for (int _i104 = 0; _i104 < _map103.size; ++_i104)
                {
                  long _key105; // required
                  double _val106; // required
                  _key105 = iprot.readI64();
                  _val106 = iprot.readDouble();
                  this.items.put(_key105, _val106);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      if (this.items != null) {
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.DOUBLE, this.items.size()));
          for (Map.Entry<Long, Double> _iter107 : this.items.entrySet())
          {
            oprot.writeI64(_iter107.getKey());
            oprot.writeDouble(_iter107.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("items:");
      if (this.items == null) {
        sb.append("null");
      } else {
        sb.append(this.items);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetCart_result implements org.apache.thrift.TBase<resetCart_result, resetCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetCart_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 org.apache.thrift.protocol.TField SCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("scex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private ShoppingCartException scex; // 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"),
      SCEX((short)1, "scex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCEX
            return SCEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.SCEX, new org.apache.thrift.meta_data.FieldMetaData("scex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
    }

    public resetCart_result() {
    }

    public resetCart_result(
      boolean success,
      ShoppingCartException scex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.scex = scex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetCart_result(resetCart_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetScex()) {
        this.scex = new ShoppingCartException(other.scex);
      }
    }

    public resetCart_result deepCopy() {
      return new resetCart_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.scex = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public ShoppingCartException getScex() {
      return this.scex;
    }

    public void setScex(ShoppingCartException scex) {
      this.scex = scex;
    }

    public void unsetScex() {
      this.scex = null;
    }

    /** Returns true if field scex is set (has been assigned a value) and false otherwise */
    public boolean isSetScex() {
      return this.scex != null;
    }

    public void setScexIsSet(boolean value) {
      if (!value) {
        this.scex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case SCEX:
        if (value == null) {
          unsetScex();
        } else {
          setScex((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case SCEX:
        return getScex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCEX:
        return isSetScex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetCart_result)
        return this.equals((resetCart_result)that);
      return false;
    }

    public boolean equals(resetCart_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_scex = true && this.isSetScex();
      boolean that_present_scex = true && that.isSetScex();
      if (this_present_scex || that_present_scex) {
        if (!(this_present_scex && that_present_scex))
          return false;
        if (!this.scex.equals(that.scex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetCart_result typedOther = (resetCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(typedOther.isSetScex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scex, typedOther.scex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scex = new ShoppingCartException();
              this.scex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetScex()) {
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
        this.scex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetCart_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("scex:");
      if (this.scex == null) {
        sb.append("null");
      } else {
        sb.append(this.scex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCount_args implements org.apache.thrift.TBase<getUserCount_args, getUserCount_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCount_args");

    private static final org.apache.thrift.protocol.TField USER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("userType", org.apache.thrift.protocol.TType.I32, (short)1);

    private UserType userType; // 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 {
      /**
       * 
       * @see UserType
       */
      USER_TYPE((short)1, "userType");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_TYPE
            return USER_TYPE;
          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.USER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("userType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, UserType.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCount_args.class, metaDataMap);
    }

    public getUserCount_args() {
    }

    public getUserCount_args(
      UserType userType)
    {
      this();
      this.userType = userType;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCount_args(getUserCount_args other) {
      if (other.isSetUserType()) {
        this.userType = other.userType;
      }
    }

    public getUserCount_args deepCopy() {
      return new getUserCount_args(this);
    }

    @Override
    public void clear() {
      this.userType = null;
    }

    /**
     * 
     * @see UserType
     */
    public UserType getUserType() {
      return this.userType;
    }

    /**
     * 
     * @see UserType
     */
    public void setUserType(UserType userType) {
      this.userType = userType;
    }

    public void unsetUserType() {
      this.userType = null;
    }

    /** Returns true if field userType is set (has been assigned a value) and false otherwise */
    public boolean isSetUserType() {
      return this.userType != null;
    }

    public void setUserTypeIsSet(boolean value) {
      if (!value) {
        this.userType = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TYPE:
        if (value == null) {
          unsetUserType();
        } else {
          setUserType((UserType)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TYPE:
        return getUserType();

      }
      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 USER_TYPE:
        return isSetUserType();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserCount_args)
        return this.equals((getUserCount_args)that);
      return false;
    }

    public boolean equals(getUserCount_args that) {
      if (that == null)
        return false;

      boolean this_present_userType = true && this.isSetUserType();
      boolean that_present_userType = true && that.isSetUserType();
      if (this_present_userType || that_present_userType) {
        if (!(this_present_userType && that_present_userType))
          return false;
        if (!this.userType.equals(that.userType))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserCount_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCount_args typedOther = (getUserCount_args)other;

      lastComparison = Boolean.valueOf(isSetUserType()).compareTo(typedOther.isSetUserType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userType, typedOther.userType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.userType = UserType.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.userType != null) {
        oprot.writeFieldBegin(USER_TYPE_FIELD_DESC);
        oprot.writeI32(this.userType.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCount_args(");
      boolean first = true;

      sb.append("userType:");
      if (this.userType == null) {
        sb.append("null");
      } else {
        sb.append(this.userType);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserCount_result implements org.apache.thrift.TBase<getUserCount_result, getUserCount_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserCount_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserCount_result.class, metaDataMap);
    }

    public getUserCount_result() {
    }

    public getUserCount_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserCount_result(getUserCount_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getUserCount_result deepCopy() {
      return new getUserCount_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(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 getUserCount_result)
        return this.equals((getUserCount_result)that);
      return false;
    }

    public boolean equals(getUserCount_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(getUserCount_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserCount_result typedOther = (getUserCount_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserCount_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUsers_args implements org.apache.thrift.TBase<getAllUsers_args, getAllUsers_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUsers_args");

    private static final org.apache.thrift.protocol.TField USER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("userType", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)3);

    private UserType userType; // required
    private long startDate; // required
    private long endDate; // 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 {
      /**
       * 
       * @see UserType
       */
      USER_TYPE((short)1, "userType"),
      START_DATE((short)2, "startDate"),
      END_DATE((short)3, "endDate");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_TYPE
            return USER_TYPE;
          case 2: // START_DATE
            return START_DATE;
          case 3: // END_DATE
            return END_DATE;
          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 __STARTDATE_ISSET_ID = 0;
    private static final int __ENDDATE_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("userType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, UserType.class)));
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUsers_args.class, metaDataMap);
    }

    public getAllUsers_args() {
    }

    public getAllUsers_args(
      UserType userType,
      long startDate,
      long endDate)
    {
      this();
      this.userType = userType;
      this.startDate = startDate;
      setStartDateIsSet(true);
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUsers_args(getAllUsers_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetUserType()) {
        this.userType = other.userType;
      }
      this.startDate = other.startDate;
      this.endDate = other.endDate;
    }

    public getAllUsers_args deepCopy() {
      return new getAllUsers_args(this);
    }

    @Override
    public void clear() {
      this.userType = null;
      setStartDateIsSet(false);
      this.startDate = 0;
      setEndDateIsSet(false);
      this.endDate = 0;
    }

    /**
     * 
     * @see UserType
     */
    public UserType getUserType() {
      return this.userType;
    }

    /**
     * 
     * @see UserType
     */
    public void setUserType(UserType userType) {
      this.userType = userType;
    }

    public void unsetUserType() {
      this.userType = null;
    }

    /** Returns true if field userType is set (has been assigned a value) and false otherwise */
    public boolean isSetUserType() {
      return this.userType != null;
    }

    public void setUserTypeIsSet(boolean value) {
      if (!value) {
        this.userType = null;
      }
    }

    public long getStartDate() {
      return this.startDate;
    }

    public void setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

    public void unsetStartDate() {
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
    }

    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
    public boolean isSetStartDate() {
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
    }

    public void setStartDateIsSet(boolean value) {
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
    }

    public long getEndDate() {
      return this.endDate;
    }

    public void setEndDate(long endDate) {
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    public void unsetEndDate() {
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
    }

    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
    public boolean isSetEndDate() {
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
    }

    public void setEndDateIsSet(boolean value) {
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TYPE:
        if (value == null) {
          unsetUserType();
        } else {
          setUserType((UserType)value);
        }
        break;

      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      case END_DATE:
        if (value == null) {
          unsetEndDate();
        } else {
          setEndDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TYPE:
        return getUserType();

      case START_DATE:
        return Long.valueOf(getStartDate());

      case END_DATE:
        return Long.valueOf(getEndDate());

      }
      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 USER_TYPE:
        return isSetUserType();
      case START_DATE:
        return isSetStartDate();
      case END_DATE:
        return isSetEndDate();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllUsers_args)
        return this.equals((getAllUsers_args)that);
      return false;
    }

    public boolean equals(getAllUsers_args that) {
      if (that == null)
        return false;

      boolean this_present_userType = true && this.isSetUserType();
      boolean that_present_userType = true && that.isSetUserType();
      if (this_present_userType || that_present_userType) {
        if (!(this_present_userType && that_present_userType))
          return false;
        if (!this.userType.equals(that.userType))
          return false;
      }

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      boolean this_present_endDate = true;
      boolean that_present_endDate = true;
      if (this_present_endDate || that_present_endDate) {
        if (!(this_present_endDate && that_present_endDate))
          return false;
        if (this.endDate != that.endDate)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllUsers_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUsers_args typedOther = (getAllUsers_args)other;

      lastComparison = Boolean.valueOf(isSetUserType()).compareTo(typedOther.isSetUserType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userType, typedOther.userType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStartDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.userType = UserType.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // START_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.startDate = iprot.readI64();
              setStartDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // END_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.endDate = iprot.readI64();
              setEndDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.userType != null) {
        oprot.writeFieldBegin(USER_TYPE_FIELD_DESC);
        oprot.writeI32(this.userType.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
      oprot.writeI64(this.startDate);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
      oprot.writeI64(this.endDate);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUsers_args(");
      boolean first = true;

      sb.append("userType:");
      if (this.userType == null) {
        sb.append("null");
      } else {
        sb.append(this.userType);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("startDate:");
      sb.append(this.startDate);
      first = false;
      if (!first) sb.append(", ");
      sb.append("endDate:");
      sb.append(this.endDate);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUsers_result implements org.apache.thrift.TBase<getAllUsers_result, getAllUsers_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUsers_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<User> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, User.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUsers_result.class, metaDataMap);
    }

    public getAllUsers_result() {
    }

    public getAllUsers_result(
      List<User> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUsers_result(getAllUsers_result other) {
      if (other.isSetSuccess()) {
        List<User> __this__success = new ArrayList<User>();
        for (User other_element : other.success) {
          __this__success.add(new User(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllUsers_result deepCopy() {
      return new getAllUsers_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<User> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(User elem) {
      if (this.success == null) {
        this.success = new ArrayList<User>();
      }
      this.success.add(elem);
    }

    public List<User> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<User> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<User>)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 getAllUsers_result)
        return this.equals((getAllUsers_result)that);
      return false;
    }

    public boolean equals(getAllUsers_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(getAllUsers_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUsers_result typedOther = (getAllUsers_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list108 = iprot.readListBegin();
                this.success = new ArrayList<User>(_list108.size);
                for (int _i109 = 0; _i109 < _list108.size; ++_i109)
                {
                  User _elem110; // required
                  _elem110 = new User();
                  _elem110.read(iprot);
                  this.success.add(_elem110);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (User _iter111 : this.success)
          {
            _iter111.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUsers_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMyResearchItems_args implements org.apache.thrift.TBase<getMyResearchItems_args, getMyResearchItems_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMyResearchItems_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMyResearchItems_args.class, metaDataMap);
    }

    public getMyResearchItems_args() {
    }

    public getMyResearchItems_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMyResearchItems_args(getMyResearchItems_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getMyResearchItems_args deepCopy() {
      return new getMyResearchItems_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMyResearchItems_args)
        return this.equals((getMyResearchItems_args)that);
      return false;
    }

    public boolean equals(getMyResearchItems_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMyResearchItems_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMyResearchItems_args typedOther = (getMyResearchItems_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMyResearchItems_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMyResearchItems_result implements org.apache.thrift.TBase<getMyResearchItems_result, getMyResearchItems_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMyResearchItems_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Long> success; // required
    private WidgetException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMyResearchItems_result.class, metaDataMap);
    }

    public getMyResearchItems_result() {
    }

    public getMyResearchItems_result(
      List<Long> success,
      WidgetException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMyResearchItems_result(getMyResearchItems_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetScx()) {
        this.scx = new WidgetException(other.scx);
      }
    }

    public getMyResearchItems_result deepCopy() {
      return new getMyResearchItems_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    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 WidgetException getScx() {
      return this.scx;
    }

    public void setScx(WidgetException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((WidgetException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMyResearchItems_result)
        return this.equals((getMyResearchItems_result)that);
      return false;
    }

    public boolean equals(getMyResearchItems_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMyResearchItems_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMyResearchItems_result typedOther = (getMyResearchItems_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list112 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list112.size);
                for (int _i113 = 0; _i113 < _list112.size; ++_i113)
                {
                  long _elem114; // required
                  _elem114 = iprot.readI64();
                  this.success.add(_elem114);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new WidgetException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter115 : this.success)
          {
            oprot.writeI64(_iter115);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMyResearchItems_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateMyResearch_args implements org.apache.thrift.TBase<updateMyResearch_args, updateMyResearch_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateMyResearch_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long userId; // required
    private long itemId; // 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 {
      USER_ID((short)1, "userId"),
      ITEM_ID((short)2, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          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 __USERID_ISSET_ID = 0;
    private static final int __ITEMID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
    }

    public updateMyResearch_args() {
    }

    public updateMyResearch_args(
      long userId,
      long itemId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateMyResearch_args(updateMyResearch_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.itemId = other.itemId;
    }

    public updateMyResearch_args deepCopy() {
      return new updateMyResearch_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      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 USER_ID:
        return isSetUserId();
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateMyResearch_args)
        return this.equals((updateMyResearch_args)that);
      return false;
    }

    public boolean equals(updateMyResearch_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateMyResearch_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateMyResearch_args typedOther = (updateMyResearch_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateMyResearch_result implements org.apache.thrift.TBase<updateMyResearch_result, updateMyResearch_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateMyResearch_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 org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private WidgetException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
    }

    public updateMyResearch_result() {
    }

    public updateMyResearch_result(
      boolean success,
      WidgetException scx)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateMyResearch_result(updateMyResearch_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetScx()) {
        this.scx = new WidgetException(other.scx);
      }
    }

    public updateMyResearch_result deepCopy() {
      return new updateMyResearch_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.scx = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public WidgetException getScx() {
      return this.scx;
    }

    public void setScx(WidgetException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((WidgetException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateMyResearch_result)
        return this.equals((updateMyResearch_result)that);
      return false;
    }

    public boolean equals(updateMyResearch_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateMyResearch_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateMyResearch_result typedOther = (updateMyResearch_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new WidgetException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromMyResearch_args implements org.apache.thrift.TBase<deleteItemFromMyResearch_args, deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromMyResearch_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long userId; // required
    private long itemId; // 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 {
      USER_ID((short)1, "userId"),
      ITEM_ID((short)2, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          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 __USERID_ISSET_ID = 0;
    private static final int __ITEMID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
    }

    public deleteItemFromMyResearch_args() {
    }

    public deleteItemFromMyResearch_args(
      long userId,
      long itemId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.itemId = other.itemId;
    }

    public deleteItemFromMyResearch_args deepCopy() {
      return new deleteItemFromMyResearch_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      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 USER_ID:
        return isSetUserId();
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromMyResearch_args)
        return this.equals((deleteItemFromMyResearch_args)that);
      return false;
    }

    public boolean equals(deleteItemFromMyResearch_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromMyResearch_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromMyResearch_result implements org.apache.thrift.TBase<deleteItemFromMyResearch_result, deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromMyResearch_result");

    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private WidgetException scx; // 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 {
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SCX
            return SCX;
          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.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
    }

    public deleteItemFromMyResearch_result() {
    }

    public deleteItemFromMyResearch_result(
      WidgetException scx)
    {
      this();
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
      if (other.isSetScx()) {
        this.scx = new WidgetException(other.scx);
      }
    }

    public deleteItemFromMyResearch_result deepCopy() {
      return new deleteItemFromMyResearch_result(this);
    }

    @Override
    public void clear() {
      this.scx = null;
    }

    public WidgetException getScx() {
      return this.scx;
    }

    public void setScx(WidgetException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((WidgetException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SCX:
        return getScx();

      }
      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 SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromMyResearch_result)
        return this.equals((deleteItemFromMyResearch_result)that);
      return false;
    }

    public boolean equals(deleteItemFromMyResearch_result that) {
      if (that == null)
        return false;

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromMyResearch_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;

      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new WidgetException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
      boolean first = true;

      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBrowseHistoryItems_args implements org.apache.thrift.TBase<getBrowseHistoryItems_args, getBrowseHistoryItems_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBrowseHistoryItems_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBrowseHistoryItems_args.class, metaDataMap);
    }

    public getBrowseHistoryItems_args() {
    }

    public getBrowseHistoryItems_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBrowseHistoryItems_args(getBrowseHistoryItems_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getBrowseHistoryItems_args deepCopy() {
      return new getBrowseHistoryItems_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getBrowseHistoryItems_args)
        return this.equals((getBrowseHistoryItems_args)that);
      return false;
    }

    public boolean equals(getBrowseHistoryItems_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getBrowseHistoryItems_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBrowseHistoryItems_args typedOther = (getBrowseHistoryItems_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBrowseHistoryItems_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBrowseHistoryItems_result implements org.apache.thrift.TBase<getBrowseHistoryItems_result, getBrowseHistoryItems_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBrowseHistoryItems_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Long> success; // required
    private WidgetException scx; // 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"),
      SCX((short)1, "scx");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCX
            return SCX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBrowseHistoryItems_result.class, metaDataMap);
    }

    public getBrowseHistoryItems_result() {
    }

    public getBrowseHistoryItems_result(
      List<Long> success,
      WidgetException scx)
    {
      this();
      this.success = success;
      this.scx = scx;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBrowseHistoryItems_result(getBrowseHistoryItems_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetScx()) {
        this.scx = new WidgetException(other.scx);
      }
    }

    public getBrowseHistoryItems_result deepCopy() {
      return new getBrowseHistoryItems_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scx = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    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 WidgetException getScx() {
      return this.scx;
    }

    public void setScx(WidgetException scx) {
      this.scx = scx;
    }

    public void unsetScx() {
      this.scx = null;
    }

    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
    public boolean isSetScx() {
      return this.scx != null;
    }

    public void setScxIsSet(boolean value) {
      if (!value) {
        this.scx = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      case SCX:
        if (value == null) {
          unsetScx();
        } else {
          setScx((WidgetException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCX:
        return getScx();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCX:
        return isSetScx();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getBrowseHistoryItems_result)
        return this.equals((getBrowseHistoryItems_result)that);
      return false;
    }

    public boolean equals(getBrowseHistoryItems_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scx = true && this.isSetScx();
      boolean that_present_scx = true && that.isSetScx();
      if (this_present_scx || that_present_scx) {
        if (!(this_present_scx && that_present_scx))
          return false;
        if (!this.scx.equals(that.scx))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getBrowseHistoryItems_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBrowseHistoryItems_result typedOther = (getBrowseHistoryItems_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list116 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list116.size);
                for (int _i117 = 0; _i117 < _list116.size; ++_i117)
                {
                  long _elem118; // required
                  _elem118 = iprot.readI64();
                  this.success.add(_elem118);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scx = new WidgetException();
              this.scx.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter119 : this.success)
          {
            oprot.writeI64(_iter119);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetScx()) {
        oprot.writeFieldBegin(SCX_FIELD_DESC);
        this.scx.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBrowseHistoryItems_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scx:");
      if (this.scx == null) {
        sb.append("null");
      } else {
        sb.append(this.scx);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateBrowseHistory_args implements org.apache.thrift.TBase<updateBrowseHistory_args, updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateBrowseHistory_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long userId; // required
    private long itemId; // 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 {
      USER_ID((short)1, "userId"),
      ITEM_ID((short)2, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          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 __USERID_ISSET_ID = 0;
    private static final int __ITEMID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
    }

    public updateBrowseHistory_args() {
    }

    public updateBrowseHistory_args(
      long userId,
      long itemId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.itemId = other.itemId;
    }

    public updateBrowseHistory_args deepCopy() {
      return new updateBrowseHistory_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      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 USER_ID:
        return isSetUserId();
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateBrowseHistory_args)
        return this.equals((updateBrowseHistory_args)that);
      return false;
    }

    public boolean equals(updateBrowseHistory_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateBrowseHistory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateBrowseHistory_result implements org.apache.thrift.TBase<updateBrowseHistory_result, updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateBrowseHistory_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
    }

    public updateBrowseHistory_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
    }

    public updateBrowseHistory_result deepCopy() {
      return new updateBrowseHistory_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 updateBrowseHistory_result)
        return this.equals((updateBrowseHistory_result)that);
      return false;
    }

    public boolean equals(updateBrowseHistory_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateBrowseHistory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateBrowseHistory_result typedOther = (updateBrowseHistory_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 {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartsWithCouponCount_args implements org.apache.thrift.TBase<getCartsWithCouponCount_args, getCartsWithCouponCount_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartsWithCouponCount_args");

    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String couponCode; // 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 {
      COUPON_CODE((short)1, "couponCode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // COUPON_CODE
            return COUPON_CODE;
          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.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", 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(getCartsWithCouponCount_args.class, metaDataMap);
    }

    public getCartsWithCouponCount_args() {
    }

    public getCartsWithCouponCount_args(
      String couponCode)
    {
      this();
      this.couponCode = couponCode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartsWithCouponCount_args(getCartsWithCouponCount_args other) {
      if (other.isSetCouponCode()) {
        this.couponCode = other.couponCode;
      }
    }

    public getCartsWithCouponCount_args deepCopy() {
      return new getCartsWithCouponCount_args(this);
    }

    @Override
    public void clear() {
      this.couponCode = null;
    }

    public String getCouponCode() {
      return this.couponCode;
    }

    public void setCouponCode(String couponCode) {
      this.couponCode = couponCode;
    }

    public void unsetCouponCode() {
      this.couponCode = null;
    }

    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
    public boolean isSetCouponCode() {
      return this.couponCode != null;
    }

    public void setCouponCodeIsSet(boolean value) {
      if (!value) {
        this.couponCode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COUPON_CODE:
        if (value == null) {
          unsetCouponCode();
        } else {
          setCouponCode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COUPON_CODE:
        return getCouponCode();

      }
      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 COUPON_CODE:
        return isSetCouponCode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCartsWithCouponCount_args)
        return this.equals((getCartsWithCouponCount_args)that);
      return false;
    }

    public boolean equals(getCartsWithCouponCount_args that) {
      if (that == null)
        return false;

      boolean this_present_couponCode = true && this.isSetCouponCode();
      boolean that_present_couponCode = true && that.isSetCouponCode();
      if (this_present_couponCode || that_present_couponCode) {
        if (!(this_present_couponCode && that_present_couponCode))
          return false;
        if (!this.couponCode.equals(that.couponCode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCartsWithCouponCount_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartsWithCouponCount_args typedOther = (getCartsWithCouponCount_args)other;

      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCouponCode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // COUPON_CODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.couponCode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.couponCode != null) {
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
        oprot.writeString(this.couponCode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartsWithCouponCount_args(");
      boolean first = true;

      sb.append("couponCode:");
      if (this.couponCode == null) {
        sb.append("null");
      } else {
        sb.append(this.couponCode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartsWithCouponCount_result implements org.apache.thrift.TBase<getCartsWithCouponCount_result, getCartsWithCouponCount_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartsWithCouponCount_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCartsWithCouponCount_result.class, metaDataMap);
    }

    public getCartsWithCouponCount_result() {
    }

    public getCartsWithCouponCount_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartsWithCouponCount_result(getCartsWithCouponCount_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getCartsWithCouponCount_result deepCopy() {
      return new getCartsWithCouponCount_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(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 getCartsWithCouponCount_result)
        return this.equals((getCartsWithCouponCount_result)that);
      return false;
    }

    public boolean equals(getCartsWithCouponCount_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(getCartsWithCouponCount_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartsWithCouponCount_result typedOther = (getCartsWithCouponCount_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartsWithCouponCount_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class increaseTrustLevel_args implements org.apache.thrift.TBase<increaseTrustLevel_args, increaseTrustLevel_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increaseTrustLevel_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TRUST_LEVEL_DELTA_FIELD_DESC = new org.apache.thrift.protocol.TField("trustLevelDelta", org.apache.thrift.protocol.TType.DOUBLE, (short)2);

    private long userId; // required
    private double trustLevelDelta; // 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 {
      USER_ID((short)1, "userId"),
      TRUST_LEVEL_DELTA((short)2, "trustLevelDelta");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // TRUST_LEVEL_DELTA
            return TRUST_LEVEL_DELTA;
          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 __USERID_ISSET_ID = 0;
    private static final int __TRUSTLEVELDELTA_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TRUST_LEVEL_DELTA, new org.apache.thrift.meta_data.FieldMetaData("trustLevelDelta", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increaseTrustLevel_args.class, metaDataMap);
    }

    public increaseTrustLevel_args() {
    }

    public increaseTrustLevel_args(
      long userId,
      double trustLevelDelta)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.trustLevelDelta = trustLevelDelta;
      setTrustLevelDeltaIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public increaseTrustLevel_args(increaseTrustLevel_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.trustLevelDelta = other.trustLevelDelta;
    }

    public increaseTrustLevel_args deepCopy() {
      return new increaseTrustLevel_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setTrustLevelDeltaIsSet(false);
      this.trustLevelDelta = 0.0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public double getTrustLevelDelta() {
      return this.trustLevelDelta;
    }

    public void setTrustLevelDelta(double trustLevelDelta) {
      this.trustLevelDelta = trustLevelDelta;
      setTrustLevelDeltaIsSet(true);
    }

    public void unsetTrustLevelDelta() {
      __isset_bit_vector.clear(__TRUSTLEVELDELTA_ISSET_ID);
    }

    /** Returns true if field trustLevelDelta is set (has been assigned a value) and false otherwise */
    public boolean isSetTrustLevelDelta() {
      return __isset_bit_vector.get(__TRUSTLEVELDELTA_ISSET_ID);
    }

    public void setTrustLevelDeltaIsSet(boolean value) {
      __isset_bit_vector.set(__TRUSTLEVELDELTA_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case TRUST_LEVEL_DELTA:
        if (value == null) {
          unsetTrustLevelDelta();
        } else {
          setTrustLevelDelta((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case TRUST_LEVEL_DELTA:
        return Double.valueOf(getTrustLevelDelta());

      }
      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 USER_ID:
        return isSetUserId();
      case TRUST_LEVEL_DELTA:
        return isSetTrustLevelDelta();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof increaseTrustLevel_args)
        return this.equals((increaseTrustLevel_args)that);
      return false;
    }

    public boolean equals(increaseTrustLevel_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_trustLevelDelta = true;
      boolean that_present_trustLevelDelta = true;
      if (this_present_trustLevelDelta || that_present_trustLevelDelta) {
        if (!(this_present_trustLevelDelta && that_present_trustLevelDelta))
          return false;
        if (this.trustLevelDelta != that.trustLevelDelta)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(increaseTrustLevel_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      increaseTrustLevel_args typedOther = (increaseTrustLevel_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTrustLevelDelta()).compareTo(typedOther.isSetTrustLevelDelta());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTrustLevelDelta()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trustLevelDelta, typedOther.trustLevelDelta);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TRUST_LEVEL_DELTA
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.trustLevelDelta = iprot.readDouble();
              setTrustLevelDeltaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TRUST_LEVEL_DELTA_FIELD_DESC);
      oprot.writeDouble(this.trustLevelDelta);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("increaseTrustLevel_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("trustLevelDelta:");
      sb.append(this.trustLevelDelta);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrustLevel_args implements org.apache.thrift.TBase<getTrustLevel_args, getTrustLevel_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrustLevel_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrustLevel_args.class, metaDataMap);
    }

    public getTrustLevel_args() {
    }

    public getTrustLevel_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrustLevel_args(getTrustLevel_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getTrustLevel_args deepCopy() {
      return new getTrustLevel_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getTrustLevel_args)
        return this.equals((getTrustLevel_args)that);
      return false;
    }

    public boolean equals(getTrustLevel_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getTrustLevel_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrustLevel_args typedOther = (getTrustLevel_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrustLevel_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTrustLevel_result implements org.apache.thrift.TBase<getTrustLevel_result, getTrustLevel_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTrustLevel_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.DOUBLE, (short)0);

    private double 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTrustLevel_result.class, metaDataMap);
    }

    public getTrustLevel_result() {
    }

    public getTrustLevel_result(
      double success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTrustLevel_result(getTrustLevel_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getTrustLevel_result deepCopy() {
      return new getTrustLevel_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0.0;
    }

    public double getSuccess() {
      return this.success;
    }

    public void setSuccess(double success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Double.valueOf(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 getTrustLevel_result)
        return this.equals((getTrustLevel_result)that);
      return false;
    }

    public boolean equals(getTrustLevel_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(getTrustLevel_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getTrustLevel_result typedOther = (getTrustLevel_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.success = iprot.readDouble();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeDouble(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTrustLevel_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class showCODOption_args implements org.apache.thrift.TBase<showCODOption_args, showCODOption_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showCODOption_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pincode", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long cartId; // required
    private long sourceId; // required
    private String pincode; // 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 {
      CART_ID((short)1, "cartId"),
      SOURCE_ID((short)2, "sourceId"),
      PINCODE((short)3, "pincode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          case 3: // PINCODE
            return PINCODE;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", 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(showCODOption_args.class, metaDataMap);
    }

    public showCODOption_args() {
    }

    public showCODOption_args(
      long cartId,
      long sourceId,
      String pincode)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.pincode = pincode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public showCODOption_args(showCODOption_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.sourceId = other.sourceId;
      if (other.isSetPincode()) {
        this.pincode = other.pincode;
      }
    }

    public showCODOption_args deepCopy() {
      return new showCODOption_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      this.pincode = null;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public String getPincode() {
      return this.pincode;
    }

    public void setPincode(String pincode) {
      this.pincode = pincode;
    }

    public void unsetPincode() {
      this.pincode = null;
    }

    /** Returns true if field pincode is set (has been assigned a value) and false otherwise */
    public boolean isSetPincode() {
      return this.pincode != null;
    }

    public void setPincodeIsSet(boolean value) {
      if (!value) {
        this.pincode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case PINCODE:
        if (value == null) {
          unsetPincode();
        } else {
          setPincode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case PINCODE:
        return getPincode();

      }
      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 CART_ID:
        return isSetCartId();
      case SOURCE_ID:
        return isSetSourceId();
      case PINCODE:
        return isSetPincode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof showCODOption_args)
        return this.equals((showCODOption_args)that);
      return false;
    }

    public boolean equals(showCODOption_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_pincode = true && this.isSetPincode();
      boolean that_present_pincode = true && that.isSetPincode();
      if (this_present_pincode || that_present_pincode) {
        if (!(this_present_pincode && that_present_pincode))
          return false;
        if (!this.pincode.equals(that.pincode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(showCODOption_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      showCODOption_args typedOther = (showCODOption_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPincode()).compareTo(typedOther.isSetPincode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPincode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // PINCODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.pincode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      if (this.pincode != null) {
        oprot.writeFieldBegin(PINCODE_FIELD_DESC);
        oprot.writeString(this.pincode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("showCODOption_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("pincode:");
      if (this.pincode == null) {
        sb.append("null");
      } else {
        sb.append(this.pincode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class showCODOption_result implements org.apache.thrift.TBase<showCODOption_result, showCODOption_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("showCODOption_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(showCODOption_result.class, metaDataMap);
    }

    public showCODOption_result() {
    }

    public showCODOption_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public showCODOption_result(showCODOption_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public showCODOption_result deepCopy() {
      return new showCODOption_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 showCODOption_result)
        return this.equals((showCODOption_result)that);
      return false;
    }

    public boolean equals(showCODOption_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(showCODOption_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      showCODOption_result typedOther = (showCODOption_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("showCODOption_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserEmails_args implements org.apache.thrift.TBase<getUserEmails_args, getUserEmails_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserEmails_args");

    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);

    private long startDate; // required
    private long endDate; // 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 {
      START_DATE((short)1, "startDate"),
      END_DATE((short)2, "endDate");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // START_DATE
            return START_DATE;
          case 2: // END_DATE
            return END_DATE;
          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 __STARTDATE_ISSET_ID = 0;
    private static final int __ENDDATE_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserEmails_args.class, metaDataMap);
    }

    public getUserEmails_args() {
    }

    public getUserEmails_args(
      long startDate,
      long endDate)
    {
      this();
      this.startDate = startDate;
      setStartDateIsSet(true);
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserEmails_args(getUserEmails_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.startDate = other.startDate;
      this.endDate = other.endDate;
    }

    public getUserEmails_args deepCopy() {
      return new getUserEmails_args(this);
    }

    @Override
    public void clear() {
      setStartDateIsSet(false);
      this.startDate = 0;
      setEndDateIsSet(false);
      this.endDate = 0;
    }

    public long getStartDate() {
      return this.startDate;
    }

    public void setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

    public void unsetStartDate() {
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
    }

    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
    public boolean isSetStartDate() {
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
    }

    public void setStartDateIsSet(boolean value) {
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
    }

    public long getEndDate() {
      return this.endDate;
    }

    public void setEndDate(long endDate) {
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    public void unsetEndDate() {
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
    }

    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
    public boolean isSetEndDate() {
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
    }

    public void setEndDateIsSet(boolean value) {
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      case END_DATE:
        if (value == null) {
          unsetEndDate();
        } else {
          setEndDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case START_DATE:
        return Long.valueOf(getStartDate());

      case END_DATE:
        return Long.valueOf(getEndDate());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case START_DATE:
        return isSetStartDate();
      case END_DATE:
        return isSetEndDate();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserEmails_args)
        return this.equals((getUserEmails_args)that);
      return false;
    }

    public boolean equals(getUserEmails_args that) {
      if (that == null)
        return false;

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      boolean this_present_endDate = true;
      boolean that_present_endDate = true;
      if (this_present_endDate || that_present_endDate) {
        if (!(this_present_endDate && that_present_endDate))
          return false;
        if (this.endDate != that.endDate)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getUserEmails_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserEmails_args typedOther = (getUserEmails_args)other;

      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStartDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // START_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.startDate = iprot.readI64();
              setStartDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // END_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.endDate = iprot.readI64();
              setEndDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
      oprot.writeI64(this.startDate);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
      oprot.writeI64(this.endDate);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserEmails_args(");
      boolean first = true;

      sb.append("startDate:");
      sb.append(this.startDate);
      first = false;
      if (!first) sb.append(", ");
      sb.append("endDate:");
      sb.append(this.endDate);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUserEmails_result implements org.apache.thrift.TBase<getUserEmails_result, getUserEmails_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserEmails_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserEmails_result.class, metaDataMap);
    }

    public getUserEmails_result() {
    }

    public getUserEmails_result(
      List<String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserEmails_result(getUserEmails_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getUserEmails_result deepCopy() {
      return new getUserEmails_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getUserEmails_result)
        return this.equals((getUserEmails_result)that);
      return false;
    }

    public boolean equals(getUserEmails_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(getUserEmails_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getUserEmails_result typedOther = (getUserEmails_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list120 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list120.size);
                for (int _i121 = 0; _i121 < _list120.size; ++_i121)
                {
                  String _elem122; // required
                  _elem122 = iprot.readString();
                  this.success.add(_elem122);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter123 : this.success)
          {
            oprot.writeString(_iter123);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUserEmails_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class insureItem_args implements org.apache.thrift.TBase<insureItem_args, insureItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insureItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField TO_INSURE_FIELD_DESC = new org.apache.thrift.protocol.TField("toInsure", org.apache.thrift.protocol.TType.BOOL, (short)3);
    private static final org.apache.thrift.protocol.TField INSURER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("insurerType", org.apache.thrift.protocol.TType.I32, (short)4);

    private long itemId; // required
    private long cartId; // required
    private boolean toInsure; // required
    private int insurerType; // 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 {
      ITEM_ID((short)1, "itemId"),
      CART_ID((short)2, "cartId"),
      TO_INSURE((short)3, "toInsure"),
      INSURER_TYPE((short)4, "insurerType");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // CART_ID
            return CART_ID;
          case 3: // TO_INSURE
            return TO_INSURE;
          case 4: // INSURER_TYPE
            return INSURER_TYPE;
          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 __ITEMID_ISSET_ID = 0;
    private static final int __CARTID_ISSET_ID = 1;
    private static final int __TOINSURE_ISSET_ID = 2;
    private static final int __INSURERTYPE_ISSET_ID = 3;
    private BitSet __isset_bit_vector = new BitSet(4);

    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.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TO_INSURE, new org.apache.thrift.meta_data.FieldMetaData("toInsure", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.INSURER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("insurerType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insureItem_args.class, metaDataMap);
    }

    public insureItem_args() {
    }

    public insureItem_args(
      long itemId,
      long cartId,
      boolean toInsure,
      int insurerType)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.toInsure = toInsure;
      setToInsureIsSet(true);
      this.insurerType = insurerType;
      setInsurerTypeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insureItem_args(insureItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.cartId = other.cartId;
      this.toInsure = other.toInsure;
      this.insurerType = other.insurerType;
    }

    public insureItem_args deepCopy() {
      return new insureItem_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setCartIdIsSet(false);
      this.cartId = 0;
      setToInsureIsSet(false);
      this.toInsure = false;
      setInsurerTypeIsSet(false);
      this.insurerType = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public boolean isToInsure() {
      return this.toInsure;
    }

    public void setToInsure(boolean toInsure) {
      this.toInsure = toInsure;
      setToInsureIsSet(true);
    }

    public void unsetToInsure() {
      __isset_bit_vector.clear(__TOINSURE_ISSET_ID);
    }

    /** Returns true if field toInsure is set (has been assigned a value) and false otherwise */
    public boolean isSetToInsure() {
      return __isset_bit_vector.get(__TOINSURE_ISSET_ID);
    }

    public void setToInsureIsSet(boolean value) {
      __isset_bit_vector.set(__TOINSURE_ISSET_ID, value);
    }

    public int getInsurerType() {
      return this.insurerType;
    }

    public void setInsurerType(int insurerType) {
      this.insurerType = insurerType;
      setInsurerTypeIsSet(true);
    }

    public void unsetInsurerType() {
      __isset_bit_vector.clear(__INSURERTYPE_ISSET_ID);
    }

    /** Returns true if field insurerType is set (has been assigned a value) and false otherwise */
    public boolean isSetInsurerType() {
      return __isset_bit_vector.get(__INSURERTYPE_ISSET_ID);
    }

    public void setInsurerTypeIsSet(boolean value) {
      __isset_bit_vector.set(__INSURERTYPE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case TO_INSURE:
        if (value == null) {
          unsetToInsure();
        } else {
          setToInsure((Boolean)value);
        }
        break;

      case INSURER_TYPE:
        if (value == null) {
          unsetInsurerType();
        } else {
          setInsurerType((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case CART_ID:
        return Long.valueOf(getCartId());

      case TO_INSURE:
        return Boolean.valueOf(isToInsure());

      case INSURER_TYPE:
        return Integer.valueOf(getInsurerType());

      }
      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 ITEM_ID:
        return isSetItemId();
      case CART_ID:
        return isSetCartId();
      case TO_INSURE:
        return isSetToInsure();
      case INSURER_TYPE:
        return isSetInsurerType();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof insureItem_args)
        return this.equals((insureItem_args)that);
      return false;
    }

    public boolean equals(insureItem_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_toInsure = true;
      boolean that_present_toInsure = true;
      if (this_present_toInsure || that_present_toInsure) {
        if (!(this_present_toInsure && that_present_toInsure))
          return false;
        if (this.toInsure != that.toInsure)
          return false;
      }

      boolean this_present_insurerType = true;
      boolean that_present_insurerType = true;
      if (this_present_insurerType || that_present_insurerType) {
        if (!(this_present_insurerType && that_present_insurerType))
          return false;
        if (this.insurerType != that.insurerType)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(insureItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      insureItem_args typedOther = (insureItem_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetToInsure()).compareTo(typedOther.isSetToInsure());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetToInsure()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toInsure, typedOther.toInsure);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetInsurerType()).compareTo(typedOther.isSetInsurerType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInsurerType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insurerType, typedOther.insurerType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // TO_INSURE
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.toInsure = iprot.readBool();
              setToInsureIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // INSURER_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.insurerType = iprot.readI32();
              setInsurerTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TO_INSURE_FIELD_DESC);
      oprot.writeBool(this.toInsure);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(INSURER_TYPE_FIELD_DESC);
      oprot.writeI32(this.insurerType);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insureItem_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("toInsure:");
      sb.append(this.toInsure);
      first = false;
      if (!first) sb.append(", ");
      sb.append("insurerType:");
      sb.append(this.insurerType);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class insureItem_result implements org.apache.thrift.TBase<insureItem_result, insureItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insureItem_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insureItem_result.class, metaDataMap);
    }

    public insureItem_result() {
    }

    public insureItem_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insureItem_result(insureItem_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public insureItem_result deepCopy() {
      return new insureItem_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 insureItem_result)
        return this.equals((insureItem_result)that);
      return false;
    }

    public boolean equals(insureItem_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(insureItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      insureItem_result typedOther = (insureItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insureItem_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class cancelInsurance_args implements org.apache.thrift.TBase<cancelInsurance_args, cancelInsurance_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelInsurance_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long cartId; // 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 {
      CART_ID((short)1, "cartId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelInsurance_args.class, metaDataMap);
    }

    public cancelInsurance_args() {
    }

    public cancelInsurance_args(
      long cartId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelInsurance_args(cancelInsurance_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
    }

    public cancelInsurance_args deepCopy() {
      return new cancelInsurance_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      }
      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 CART_ID:
        return isSetCartId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof cancelInsurance_args)
        return this.equals((cancelInsurance_args)that);
      return false;
    }

    public boolean equals(cancelInsurance_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(cancelInsurance_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      cancelInsurance_args typedOther = (cancelInsurance_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("cancelInsurance_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class cancelInsurance_result implements org.apache.thrift.TBase<cancelInsurance_result, cancelInsurance_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelInsurance_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelInsurance_result.class, metaDataMap);
    }

    public cancelInsurance_result() {
    }

    public cancelInsurance_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelInsurance_result(cancelInsurance_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public cancelInsurance_result deepCopy() {
      return new cancelInsurance_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 cancelInsurance_result)
        return this.equals((cancelInsurance_result)that);
      return false;
    }

    public boolean equals(cancelInsurance_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(cancelInsurance_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      cancelInsurance_result typedOther = (cancelInsurance_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("cancelInsurance_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class storeInsuranceSpecificDetails_args implements org.apache.thrift.TBase<storeInsuranceSpecificDetails_args, storeInsuranceSpecificDetails_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeInsuranceSpecificDetails_args");

    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DOB_FIELD_DESC = new org.apache.thrift.protocol.TField("dob", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField GUARDIAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("guardianName", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long addressId; // required
    private String dob; // required
    private String guardianName; // 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 {
      ADDRESS_ID((short)1, "addressId"),
      DOB((short)2, "dob"),
      GUARDIAN_NAME((short)3, "guardianName");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ADDRESS_ID
            return ADDRESS_ID;
          case 2: // DOB
            return DOB;
          case 3: // GUARDIAN_NAME
            return GUARDIAN_NAME;
          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 __ADDRESSID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DOB, new org.apache.thrift.meta_data.FieldMetaData("dob", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.GUARDIAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("guardianName", 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(storeInsuranceSpecificDetails_args.class, metaDataMap);
    }

    public storeInsuranceSpecificDetails_args() {
    }

    public storeInsuranceSpecificDetails_args(
      long addressId,
      String dob,
      String guardianName)
    {
      this();
      this.addressId = addressId;
      setAddressIdIsSet(true);
      this.dob = dob;
      this.guardianName = guardianName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeInsuranceSpecificDetails_args(storeInsuranceSpecificDetails_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.addressId = other.addressId;
      if (other.isSetDob()) {
        this.dob = other.dob;
      }
      if (other.isSetGuardianName()) {
        this.guardianName = other.guardianName;
      }
    }

    public storeInsuranceSpecificDetails_args deepCopy() {
      return new storeInsuranceSpecificDetails_args(this);
    }

    @Override
    public void clear() {
      setAddressIdIsSet(false);
      this.addressId = 0;
      this.dob = null;
      this.guardianName = null;
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public String getDob() {
      return this.dob;
    }

    public void setDob(String dob) {
      this.dob = dob;
    }

    public void unsetDob() {
      this.dob = null;
    }

    /** Returns true if field dob is set (has been assigned a value) and false otherwise */
    public boolean isSetDob() {
      return this.dob != null;
    }

    public void setDobIsSet(boolean value) {
      if (!value) {
        this.dob = null;
      }
    }

    public String getGuardianName() {
      return this.guardianName;
    }

    public void setGuardianName(String guardianName) {
      this.guardianName = guardianName;
    }

    public void unsetGuardianName() {
      this.guardianName = null;
    }

    /** Returns true if field guardianName is set (has been assigned a value) and false otherwise */
    public boolean isSetGuardianName() {
      return this.guardianName != null;
    }

    public void setGuardianNameIsSet(boolean value) {
      if (!value) {
        this.guardianName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      case DOB:
        if (value == null) {
          unsetDob();
        } else {
          setDob((String)value);
        }
        break;

      case GUARDIAN_NAME:
        if (value == null) {
          unsetGuardianName();
        } else {
          setGuardianName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      case DOB:
        return getDob();

      case GUARDIAN_NAME:
        return getGuardianName();

      }
      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 ADDRESS_ID:
        return isSetAddressId();
      case DOB:
        return isSetDob();
      case GUARDIAN_NAME:
        return isSetGuardianName();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeInsuranceSpecificDetails_args)
        return this.equals((storeInsuranceSpecificDetails_args)that);
      return false;
    }

    public boolean equals(storeInsuranceSpecificDetails_args that) {
      if (that == null)
        return false;

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      boolean this_present_dob = true && this.isSetDob();
      boolean that_present_dob = true && that.isSetDob();
      if (this_present_dob || that_present_dob) {
        if (!(this_present_dob && that_present_dob))
          return false;
        if (!this.dob.equals(that.dob))
          return false;
      }

      boolean this_present_guardianName = true && this.isSetGuardianName();
      boolean that_present_guardianName = true && that.isSetGuardianName();
      if (this_present_guardianName || that_present_guardianName) {
        if (!(this_present_guardianName && that_present_guardianName))
          return false;
        if (!this.guardianName.equals(that.guardianName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeInsuranceSpecificDetails_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeInsuranceSpecificDetails_args typedOther = (storeInsuranceSpecificDetails_args)other;

      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDob()).compareTo(typedOther.isSetDob());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDob()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dob, typedOther.dob);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuardianName()).compareTo(typedOther.isSetGuardianName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuardianName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guardianName, typedOther.guardianName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // DOB
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.dob = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // GUARDIAN_NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.guardianName = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      if (this.dob != null) {
        oprot.writeFieldBegin(DOB_FIELD_DESC);
        oprot.writeString(this.dob);
        oprot.writeFieldEnd();
      }
      if (this.guardianName != null) {
        oprot.writeFieldBegin(GUARDIAN_NAME_FIELD_DESC);
        oprot.writeString(this.guardianName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeInsuranceSpecificDetails_args(");
      boolean first = true;

      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("dob:");
      if (this.dob == null) {
        sb.append("null");
      } else {
        sb.append(this.dob);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("guardianName:");
      if (this.guardianName == null) {
        sb.append("null");
      } else {
        sb.append(this.guardianName);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class storeInsuranceSpecificDetails_result implements org.apache.thrift.TBase<storeInsuranceSpecificDetails_result, storeInsuranceSpecificDetails_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeInsuranceSpecificDetails_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeInsuranceSpecificDetails_result.class, metaDataMap);
    }

    public storeInsuranceSpecificDetails_result() {
    }

    public storeInsuranceSpecificDetails_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeInsuranceSpecificDetails_result(storeInsuranceSpecificDetails_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public storeInsuranceSpecificDetails_result deepCopy() {
      return new storeInsuranceSpecificDetails_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 storeInsuranceSpecificDetails_result)
        return this.equals((storeInsuranceSpecificDetails_result)that);
      return false;
    }

    public boolean equals(storeInsuranceSpecificDetails_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(storeInsuranceSpecificDetails_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeInsuranceSpecificDetails_result typedOther = (storeInsuranceSpecificDetails_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeInsuranceSpecificDetails_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isInsuranceDetailPresent_args implements org.apache.thrift.TBase<isInsuranceDetailPresent_args, isInsuranceDetailPresent_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInsuranceDetailPresent_args");

    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long addressId; // 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 {
      ADDRESS_ID((short)1, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ADDRESS_ID
            return ADDRESS_ID;
          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 __ADDRESSID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInsuranceDetailPresent_args.class, metaDataMap);
    }

    public isInsuranceDetailPresent_args() {
    }

    public isInsuranceDetailPresent_args(
      long addressId)
    {
      this();
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isInsuranceDetailPresent_args(isInsuranceDetailPresent_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.addressId = other.addressId;
    }

    public isInsuranceDetailPresent_args deepCopy() {
      return new isInsuranceDetailPresent_args(this);
    }

    @Override
    public void clear() {
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isInsuranceDetailPresent_args)
        return this.equals((isInsuranceDetailPresent_args)that);
      return false;
    }

    public boolean equals(isInsuranceDetailPresent_args that) {
      if (that == null)
        return false;

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isInsuranceDetailPresent_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isInsuranceDetailPresent_args typedOther = (isInsuranceDetailPresent_args)other;

      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isInsuranceDetailPresent_args(");
      boolean first = true;

      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isInsuranceDetailPresent_result implements org.apache.thrift.TBase<isInsuranceDetailPresent_result, isInsuranceDetailPresent_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isInsuranceDetailPresent_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isInsuranceDetailPresent_result.class, metaDataMap);
    }

    public isInsuranceDetailPresent_result() {
    }

    public isInsuranceDetailPresent_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isInsuranceDetailPresent_result(isInsuranceDetailPresent_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isInsuranceDetailPresent_result deepCopy() {
      return new isInsuranceDetailPresent_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 isInsuranceDetailPresent_result)
        return this.equals((isInsuranceDetailPresent_result)that);
      return false;
    }

    public boolean equals(isInsuranceDetailPresent_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(isInsuranceDetailPresent_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isInsuranceDetailPresent_result typedOther = (isInsuranceDetailPresent_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isInsuranceDetailPresent_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getProductsAddedToCart_args implements org.apache.thrift.TBase<getProductsAddedToCart_args, getProductsAddedToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProductsAddedToCart_args");

    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);

    private long startDate; // required
    private long endDate; // 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 {
      START_DATE((short)1, "startDate"),
      END_DATE((short)2, "endDate");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // START_DATE
            return START_DATE;
          case 2: // END_DATE
            return END_DATE;
          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 __STARTDATE_ISSET_ID = 0;
    private static final int __ENDDATE_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProductsAddedToCart_args.class, metaDataMap);
    }

    public getProductsAddedToCart_args() {
    }

    public getProductsAddedToCart_args(
      long startDate,
      long endDate)
    {
      this();
      this.startDate = startDate;
      setStartDateIsSet(true);
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getProductsAddedToCart_args(getProductsAddedToCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.startDate = other.startDate;
      this.endDate = other.endDate;
    }

    public getProductsAddedToCart_args deepCopy() {
      return new getProductsAddedToCart_args(this);
    }

    @Override
    public void clear() {
      setStartDateIsSet(false);
      this.startDate = 0;
      setEndDateIsSet(false);
      this.endDate = 0;
    }

    public long getStartDate() {
      return this.startDate;
    }

    public void setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

    public void unsetStartDate() {
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
    }

    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
    public boolean isSetStartDate() {
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
    }

    public void setStartDateIsSet(boolean value) {
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
    }

    public long getEndDate() {
      return this.endDate;
    }

    public void setEndDate(long endDate) {
      this.endDate = endDate;
      setEndDateIsSet(true);
    }

    public void unsetEndDate() {
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
    }

    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
    public boolean isSetEndDate() {
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
    }

    public void setEndDateIsSet(boolean value) {
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      case END_DATE:
        if (value == null) {
          unsetEndDate();
        } else {
          setEndDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case START_DATE:
        return Long.valueOf(getStartDate());

      case END_DATE:
        return Long.valueOf(getEndDate());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case START_DATE:
        return isSetStartDate();
      case END_DATE:
        return isSetEndDate();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getProductsAddedToCart_args)
        return this.equals((getProductsAddedToCart_args)that);
      return false;
    }

    public boolean equals(getProductsAddedToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      boolean this_present_endDate = true;
      boolean that_present_endDate = true;
      if (this_present_endDate || that_present_endDate) {
        if (!(this_present_endDate && that_present_endDate))
          return false;
        if (this.endDate != that.endDate)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getProductsAddedToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getProductsAddedToCart_args typedOther = (getProductsAddedToCart_args)other;

      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStartDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // START_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.startDate = iprot.readI64();
              setStartDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // END_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.endDate = iprot.readI64();
              setEndDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
      oprot.writeI64(this.startDate);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
      oprot.writeI64(this.endDate);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getProductsAddedToCart_args(");
      boolean first = true;

      sb.append("startDate:");
      sb.append(this.startDate);
      first = false;
      if (!first) sb.append(", ");
      sb.append("endDate:");
      sb.append(this.endDate);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getProductsAddedToCart_result implements org.apache.thrift.TBase<getProductsAddedToCart_result, getProductsAddedToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProductsAddedToCart_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Long> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getProductsAddedToCart_result.class, metaDataMap);
    }

    public getProductsAddedToCart_result() {
    }

    public getProductsAddedToCart_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getProductsAddedToCart_result(getProductsAddedToCart_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getProductsAddedToCart_result deepCopy() {
      return new getProductsAddedToCart_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)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 getProductsAddedToCart_result)
        return this.equals((getProductsAddedToCart_result)that);
      return false;
    }

    public boolean equals(getProductsAddedToCart_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(getProductsAddedToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getProductsAddedToCart_result typedOther = (getProductsAddedToCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list124 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list124.size);
                for (int _i125 = 0; _i125 < _list124.size; ++_i125)
                {
                  long _elem126; // required
                  _elem126 = iprot.readI64();
                  this.success.add(_elem126);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter127 : this.success)
          {
            oprot.writeI64(_iter127);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getProductsAddedToCart_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartPlus_args implements org.apache.thrift.TBase<validateCartPlus_args, validateCartPlus_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartPlus_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField DEALER_COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerCoupon", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long cartId; // required
    private long sourceId; // required
    private String dealerCoupon; // 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 {
      CART_ID((short)1, "cartId"),
      SOURCE_ID((short)2, "sourceId"),
      DEALER_COUPON((short)3, "dealerCoupon");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          case 3: // DEALER_COUPON
            return DEALER_COUPON;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DEALER_COUPON, new org.apache.thrift.meta_data.FieldMetaData("dealerCoupon", 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(validateCartPlus_args.class, metaDataMap);
    }

    public validateCartPlus_args() {
    }

    public validateCartPlus_args(
      long cartId,
      long sourceId,
      String dealerCoupon)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.dealerCoupon = dealerCoupon;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartPlus_args(validateCartPlus_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.sourceId = other.sourceId;
      if (other.isSetDealerCoupon()) {
        this.dealerCoupon = other.dealerCoupon;
      }
    }

    public validateCartPlus_args deepCopy() {
      return new validateCartPlus_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      this.dealerCoupon = null;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public String getDealerCoupon() {
      return this.dealerCoupon;
    }

    public void setDealerCoupon(String dealerCoupon) {
      this.dealerCoupon = dealerCoupon;
    }

    public void unsetDealerCoupon() {
      this.dealerCoupon = null;
    }

    /** Returns true if field dealerCoupon is set (has been assigned a value) and false otherwise */
    public boolean isSetDealerCoupon() {
      return this.dealerCoupon != null;
    }

    public void setDealerCouponIsSet(boolean value) {
      if (!value) {
        this.dealerCoupon = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case DEALER_COUPON:
        if (value == null) {
          unsetDealerCoupon();
        } else {
          setDealerCoupon((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case DEALER_COUPON:
        return getDealerCoupon();

      }
      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 CART_ID:
        return isSetCartId();
      case SOURCE_ID:
        return isSetSourceId();
      case DEALER_COUPON:
        return isSetDealerCoupon();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartPlus_args)
        return this.equals((validateCartPlus_args)that);
      return false;
    }

    public boolean equals(validateCartPlus_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_dealerCoupon = true && this.isSetDealerCoupon();
      boolean that_present_dealerCoupon = true && that.isSetDealerCoupon();
      if (this_present_dealerCoupon || that_present_dealerCoupon) {
        if (!(this_present_dealerCoupon && that_present_dealerCoupon))
          return false;
        if (!this.dealerCoupon.equals(that.dealerCoupon))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCartPlus_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartPlus_args typedOther = (validateCartPlus_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDealerCoupon()).compareTo(typedOther.isSetDealerCoupon());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDealerCoupon()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerCoupon, typedOther.dealerCoupon);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // DEALER_COUPON
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.dealerCoupon = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      if (this.dealerCoupon != null) {
        oprot.writeFieldBegin(DEALER_COUPON_FIELD_DESC);
        oprot.writeString(this.dealerCoupon);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartPlus_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("dealerCoupon:");
      if (this.dealerCoupon == null) {
        sb.append("null");
      } else {
        sb.append(this.dealerCoupon);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartPlus_result implements org.apache.thrift.TBase<validateCartPlus_result, validateCartPlus_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartPlus_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField SCEX_FIELD_DESC = new org.apache.thrift.protocol.TField("scex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private CartPlus success; // required
    private ShoppingCartException scex; // 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"),
      SCEX((short)1, "scex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // SCEX
            return SCEX;
          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, CartPlus.class)));
      tmpMap.put(_Fields.SCEX, new org.apache.thrift.meta_data.FieldMetaData("scex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCartPlus_result.class, metaDataMap);
    }

    public validateCartPlus_result() {
    }

    public validateCartPlus_result(
      CartPlus success,
      ShoppingCartException scex)
    {
      this();
      this.success = success;
      this.scex = scex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartPlus_result(validateCartPlus_result other) {
      if (other.isSetSuccess()) {
        this.success = new CartPlus(other.success);
      }
      if (other.isSetScex()) {
        this.scex = new ShoppingCartException(other.scex);
      }
    }

    public validateCartPlus_result deepCopy() {
      return new validateCartPlus_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.scex = null;
    }

    public CartPlus getSuccess() {
      return this.success;
    }

    public void setSuccess(CartPlus success) {
      this.success = success;
    }

    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 ShoppingCartException getScex() {
      return this.scex;
    }

    public void setScex(ShoppingCartException scex) {
      this.scex = scex;
    }

    public void unsetScex() {
      this.scex = null;
    }

    /** Returns true if field scex is set (has been assigned a value) and false otherwise */
    public boolean isSetScex() {
      return this.scex != null;
    }

    public void setScexIsSet(boolean value) {
      if (!value) {
        this.scex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((CartPlus)value);
        }
        break;

      case SCEX:
        if (value == null) {
          unsetScex();
        } else {
          setScex((ShoppingCartException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case SCEX:
        return getScex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SCEX:
        return isSetScex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartPlus_result)
        return this.equals((validateCartPlus_result)that);
      return false;
    }

    public boolean equals(validateCartPlus_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_scex = true && this.isSetScex();
      boolean that_present_scex = true && that.isSetScex();
      if (this_present_scex || that_present_scex) {
        if (!(this_present_scex && that_present_scex))
          return false;
        if (!this.scex.equals(that.scex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCartPlus_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartPlus_result typedOther = (validateCartPlus_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(typedOther.isSetScex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetScex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scex, typedOther.scex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new CartPlus();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SCEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.scex = new ShoppingCartException();
              this.scex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetScex()) {
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
        this.scex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartPlus_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("scex:");
      if (this.scex == null) {
        sb.append("null");
      } else {
        sb.append(this.scex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isPrivateDealUser_args implements org.apache.thrift.TBase<isPrivateDealUser_args, isPrivateDealUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPrivateDealUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPrivateDealUser_args.class, metaDataMap);
    }

    public isPrivateDealUser_args() {
    }

    public isPrivateDealUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isPrivateDealUser_args(isPrivateDealUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public isPrivateDealUser_args deepCopy() {
      return new isPrivateDealUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isPrivateDealUser_args)
        return this.equals((isPrivateDealUser_args)that);
      return false;
    }

    public boolean equals(isPrivateDealUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isPrivateDealUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isPrivateDealUser_args typedOther = (isPrivateDealUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isPrivateDealUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isPrivateDealUser_result implements org.apache.thrift.TBase<isPrivateDealUser_result, isPrivateDealUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPrivateDealUser_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPrivateDealUser_result.class, metaDataMap);
    }

    public isPrivateDealUser_result() {
    }

    public isPrivateDealUser_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isPrivateDealUser_result(isPrivateDealUser_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isPrivateDealUser_result deepCopy() {
      return new isPrivateDealUser_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 isPrivateDealUser_result)
        return this.equals((isPrivateDealUser_result)that);
      return false;
    }

    public boolean equals(isPrivateDealUser_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(isPrivateDealUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isPrivateDealUser_result typedOther = (isPrivateDealUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isPrivateDealUser_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addPrivateDealUser_args implements org.apache.thrift.TBase<addPrivateDealUser_args, addPrivateDealUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPrivateDealUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPrivateDealUser_args.class, metaDataMap);
    }

    public addPrivateDealUser_args() {
    }

    public addPrivateDealUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addPrivateDealUser_args(addPrivateDealUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public addPrivateDealUser_args deepCopy() {
      return new addPrivateDealUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addPrivateDealUser_args)
        return this.equals((addPrivateDealUser_args)that);
      return false;
    }

    public boolean equals(addPrivateDealUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addPrivateDealUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addPrivateDealUser_args typedOther = (addPrivateDealUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addPrivateDealUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addPrivateDealUser_result implements org.apache.thrift.TBase<addPrivateDealUser_result, addPrivateDealUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPrivateDealUser_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPrivateDealUser_result.class, metaDataMap);
    }

    public addPrivateDealUser_result() {
    }

    public addPrivateDealUser_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addPrivateDealUser_result(addPrivateDealUser_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public addPrivateDealUser_result deepCopy() {
      return new addPrivateDealUser_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 addPrivateDealUser_result)
        return this.equals((addPrivateDealUser_result)that);
      return false;
    }

    public boolean equals(addPrivateDealUser_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(addPrivateDealUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addPrivateDealUser_result typedOther = (addPrivateDealUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addPrivateDealUser_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class changePrivateDealUserStatus_args implements org.apache.thrift.TBase<changePrivateDealUserStatus_args, changePrivateDealUserStatus_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePrivateDealUserStatus_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)2);

    private long userId; // required
    private boolean isActive; // 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 {
      USER_ID((short)1, "userId"),
      IS_ACTIVE((short)2, "isActive");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // IS_ACTIVE
            return IS_ACTIVE;
          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 __USERID_ISSET_ID = 0;
    private static final int __ISACTIVE_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", 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(changePrivateDealUserStatus_args.class, metaDataMap);
    }

    public changePrivateDealUserStatus_args() {
    }

    public changePrivateDealUserStatus_args(
      long userId,
      boolean isActive)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.isActive = isActive;
      setIsActiveIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public changePrivateDealUserStatus_args(changePrivateDealUserStatus_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      this.isActive = other.isActive;
    }

    public changePrivateDealUserStatus_args deepCopy() {
      return new changePrivateDealUserStatus_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      setIsActiveIsSet(false);
      this.isActive = false;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public boolean isIsActive() {
      return this.isActive;
    }

    public void setIsActive(boolean isActive) {
      this.isActive = isActive;
      setIsActiveIsSet(true);
    }

    public void unsetIsActive() {
      __isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
    }

    /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
    public boolean isSetIsActive() {
      return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
    }

    public void setIsActiveIsSet(boolean value) {
      __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case IS_ACTIVE:
        if (value == null) {
          unsetIsActive();
        } else {
          setIsActive((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case IS_ACTIVE:
        return Boolean.valueOf(isIsActive());

      }
      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 USER_ID:
        return isSetUserId();
      case IS_ACTIVE:
        return isSetIsActive();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof changePrivateDealUserStatus_args)
        return this.equals((changePrivateDealUserStatus_args)that);
      return false;
    }

    public boolean equals(changePrivateDealUserStatus_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_isActive = true;
      boolean that_present_isActive = true;
      if (this_present_isActive || that_present_isActive) {
        if (!(this_present_isActive && that_present_isActive))
          return false;
        if (this.isActive != that.isActive)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(changePrivateDealUserStatus_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      changePrivateDealUserStatus_args typedOther = (changePrivateDealUserStatus_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIsActive()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // IS_ACTIVE
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.isActive = iprot.readBool();
              setIsActiveIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
      oprot.writeBool(this.isActive);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changePrivateDealUserStatus_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("isActive:");
      sb.append(this.isActive);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class changePrivateDealUserStatus_result implements org.apache.thrift.TBase<changePrivateDealUserStatus_result, changePrivateDealUserStatus_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changePrivateDealUserStatus_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changePrivateDealUserStatus_result.class, metaDataMap);
    }

    public changePrivateDealUserStatus_result() {
    }

    public changePrivateDealUserStatus_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public changePrivateDealUserStatus_result(changePrivateDealUserStatus_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public changePrivateDealUserStatus_result deepCopy() {
      return new changePrivateDealUserStatus_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 changePrivateDealUserStatus_result)
        return this.equals((changePrivateDealUserStatus_result)that);
      return false;
    }

    public boolean equals(changePrivateDealUserStatus_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(changePrivateDealUserStatus_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      changePrivateDealUserStatus_result typedOther = (changePrivateDealUserStatus_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changePrivateDealUserStatus_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getPrivateDealUser_args implements org.apache.thrift.TBase<getPrivateDealUser_args, getPrivateDealUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrivateDealUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrivateDealUser_args.class, metaDataMap);
    }

    public getPrivateDealUser_args() {
    }

    public getPrivateDealUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPrivateDealUser_args(getPrivateDealUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getPrivateDealUser_args deepCopy() {
      return new getPrivateDealUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPrivateDealUser_args)
        return this.equals((getPrivateDealUser_args)that);
      return false;
    }

    public boolean equals(getPrivateDealUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getPrivateDealUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getPrivateDealUser_args typedOther = (getPrivateDealUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPrivateDealUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getPrivateDealUser_result implements org.apache.thrift.TBase<getPrivateDealUser_result, getPrivateDealUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrivateDealUser_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 PrivateDealUser 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivateDealUser.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrivateDealUser_result.class, metaDataMap);
    }

    public getPrivateDealUser_result() {
    }

    public getPrivateDealUser_result(
      PrivateDealUser success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPrivateDealUser_result(getPrivateDealUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new PrivateDealUser(other.success);
      }
    }

    public getPrivateDealUser_result deepCopy() {
      return new getPrivateDealUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public PrivateDealUser getSuccess() {
      return this.success;
    }

    public void setSuccess(PrivateDealUser success) {
      this.success = success;
    }

    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((PrivateDealUser)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 getPrivateDealUser_result)
        return this.equals((getPrivateDealUser_result)that);
      return false;
    }

    public boolean equals(getPrivateDealUser_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(getPrivateDealUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getPrivateDealUser_result typedOther = (getPrivateDealUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new PrivateDealUser();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPrivateDealUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class registerCounter_args implements org.apache.thrift.TBase<registerCounter_args, registerCounter_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCounter_args");

    private static final org.apache.thrift.protocol.TField COUNTER_FIELD_DESC = new org.apache.thrift.protocol.TField("counter", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);

    private Counter counter; // required
    private long userId; // 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 {
      COUNTER((short)1, "counter"),
      USER_ID((short)2, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // COUNTER
            return COUNTER;
          case 2: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.COUNTER, new org.apache.thrift.meta_data.FieldMetaData("counter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerCounter_args.class, metaDataMap);
    }

    public registerCounter_args() {
    }

    public registerCounter_args(
      Counter counter,
      long userId)
    {
      this();
      this.counter = counter;
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerCounter_args(registerCounter_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetCounter()) {
        this.counter = new Counter(other.counter);
      }
      this.userId = other.userId;
    }

    public registerCounter_args deepCopy() {
      return new registerCounter_args(this);
    }

    @Override
    public void clear() {
      this.counter = null;
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public Counter getCounter() {
      return this.counter;
    }

    public void setCounter(Counter counter) {
      this.counter = counter;
    }

    public void unsetCounter() {
      this.counter = null;
    }

    /** Returns true if field counter is set (has been assigned a value) and false otherwise */
    public boolean isSetCounter() {
      return this.counter != null;
    }

    public void setCounterIsSet(boolean value) {
      if (!value) {
        this.counter = null;
      }
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COUNTER:
        if (value == null) {
          unsetCounter();
        } else {
          setCounter((Counter)value);
        }
        break;

      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COUNTER:
        return getCounter();

      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 COUNTER:
        return isSetCounter();
      case USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof registerCounter_args)
        return this.equals((registerCounter_args)that);
      return false;
    }

    public boolean equals(registerCounter_args that) {
      if (that == null)
        return false;

      boolean this_present_counter = true && this.isSetCounter();
      boolean that_present_counter = true && that.isSetCounter();
      if (this_present_counter || that_present_counter) {
        if (!(this_present_counter && that_present_counter))
          return false;
        if (!this.counter.equals(that.counter))
          return false;
      }

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(registerCounter_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      registerCounter_args typedOther = (registerCounter_args)other;

      lastComparison = Boolean.valueOf(isSetCounter()).compareTo(typedOther.isSetCounter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCounter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counter, typedOther.counter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // COUNTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.counter = new Counter();
              this.counter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.counter != null) {
        oprot.writeFieldBegin(COUNTER_FIELD_DESC);
        this.counter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("registerCounter_args(");
      boolean first = true;

      sb.append("counter:");
      if (this.counter == null) {
        sb.append("null");
      } else {
        sb.append(this.counter);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class registerCounter_result implements org.apache.thrift.TBase<registerCounter_result, registerCounter_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCounter_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 Map<String,String> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerCounter_result.class, metaDataMap);
    }

    public registerCounter_result() {
    }

    public registerCounter_result(
      Map<String,String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerCounter_result(registerCounter_result other) {
      if (other.isSetSuccess()) {
        Map<String,String> __this__success = new HashMap<String,String>();
        for (Map.Entry<String, String> other_element : other.success.entrySet()) {

          String other_element_key = other_element.getKey();
          String other_element_value = other_element.getValue();

          String __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 registerCounter_result deepCopy() {
      return new registerCounter_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(String key, String val) {
      if (this.success == null) {
        this.success = new HashMap<String,String>();
      }
      this.success.put(key, val);
    }

    public Map<String,String> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<String,String> success) {
      this.success = success;
    }

    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<String,String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof registerCounter_result)
        return this.equals((registerCounter_result)that);
      return false;
    }

    public boolean equals(registerCounter_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(registerCounter_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      registerCounter_result typedOther = (registerCounter_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map128 = iprot.readMapBegin();
                this.success = new HashMap<String,String>(2*_map128.size);
                for (int _i129 = 0; _i129 < _map128.size; ++_i129)
                {
                  String _key130; // required
                  String _val131; // required
                  _key130 = iprot.readString();
                  _val131 = iprot.readString();
                  this.success.put(_key130, _val131);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (Map.Entry<String, String> _iter132 : this.success.entrySet())
          {
            oprot.writeString(_iter132.getKey());
            oprot.writeString(_iter132.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("registerCounter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class searchCounter_args implements org.apache.thrift.TBase<searchCounter_args, searchCounter_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchCounter_args");

    private static final org.apache.thrift.protocol.TField TYPE1_FIELD_DESC = new org.apache.thrift.protocol.TField("type1", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SEARCH_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("searchString", org.apache.thrift.protocol.TType.STRING, (short)2);

    private String type1; // required
    private String searchString; // 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 {
      TYPE1((short)1, "type1"),
      SEARCH_STRING((short)2, "searchString");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // TYPE1
            return TYPE1;
          case 2: // SEARCH_STRING
            return SEARCH_STRING;
          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.TYPE1, new org.apache.thrift.meta_data.FieldMetaData("type1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SEARCH_STRING, new org.apache.thrift.meta_data.FieldMetaData("searchString", 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(searchCounter_args.class, metaDataMap);
    }

    public searchCounter_args() {
    }

    public searchCounter_args(
      String type1,
      String searchString)
    {
      this();
      this.type1 = type1;
      this.searchString = searchString;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public searchCounter_args(searchCounter_args other) {
      if (other.isSetType1()) {
        this.type1 = other.type1;
      }
      if (other.isSetSearchString()) {
        this.searchString = other.searchString;
      }
    }

    public searchCounter_args deepCopy() {
      return new searchCounter_args(this);
    }

    @Override
    public void clear() {
      this.type1 = null;
      this.searchString = null;
    }

    public String getType1() {
      return this.type1;
    }

    public void setType1(String type1) {
      this.type1 = type1;
    }

    public void unsetType1() {
      this.type1 = null;
    }

    /** Returns true if field type1 is set (has been assigned a value) and false otherwise */
    public boolean isSetType1() {
      return this.type1 != null;
    }

    public void setType1IsSet(boolean value) {
      if (!value) {
        this.type1 = null;
      }
    }

    public String getSearchString() {
      return this.searchString;
    }

    public void setSearchString(String searchString) {
      this.searchString = searchString;
    }

    public void unsetSearchString() {
      this.searchString = null;
    }

    /** Returns true if field searchString is set (has been assigned a value) and false otherwise */
    public boolean isSetSearchString() {
      return this.searchString != null;
    }

    public void setSearchStringIsSet(boolean value) {
      if (!value) {
        this.searchString = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TYPE1:
        if (value == null) {
          unsetType1();
        } else {
          setType1((String)value);
        }
        break;

      case SEARCH_STRING:
        if (value == null) {
          unsetSearchString();
        } else {
          setSearchString((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TYPE1:
        return getType1();

      case SEARCH_STRING:
        return getSearchString();

      }
      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 TYPE1:
        return isSetType1();
      case SEARCH_STRING:
        return isSetSearchString();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof searchCounter_args)
        return this.equals((searchCounter_args)that);
      return false;
    }

    public boolean equals(searchCounter_args that) {
      if (that == null)
        return false;

      boolean this_present_type1 = true && this.isSetType1();
      boolean that_present_type1 = true && that.isSetType1();
      if (this_present_type1 || that_present_type1) {
        if (!(this_present_type1 && that_present_type1))
          return false;
        if (!this.type1.equals(that.type1))
          return false;
      }

      boolean this_present_searchString = true && this.isSetSearchString();
      boolean that_present_searchString = true && that.isSetSearchString();
      if (this_present_searchString || that_present_searchString) {
        if (!(this_present_searchString && that_present_searchString))
          return false;
        if (!this.searchString.equals(that.searchString))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(searchCounter_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      searchCounter_args typedOther = (searchCounter_args)other;

      lastComparison = Boolean.valueOf(isSetType1()).compareTo(typedOther.isSetType1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetType1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type1, typedOther.type1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSearchString()).compareTo(typedOther.isSetSearchString());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchString()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchString, typedOther.searchString);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // TYPE1
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.type1 = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SEARCH_STRING
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.searchString = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.type1 != null) {
        oprot.writeFieldBegin(TYPE1_FIELD_DESC);
        oprot.writeString(this.type1);
        oprot.writeFieldEnd();
      }
      if (this.searchString != null) {
        oprot.writeFieldBegin(SEARCH_STRING_FIELD_DESC);
        oprot.writeString(this.searchString);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("searchCounter_args(");
      boolean first = true;

      sb.append("type1:");
      if (this.type1 == null) {
        sb.append("null");
      } else {
        sb.append(this.type1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("searchString:");
      if (this.searchString == null) {
        sb.append("null");
      } else {
        sb.append(this.searchString);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class searchCounter_result implements org.apache.thrift.TBase<searchCounter_result, searchCounter_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchCounter_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Counter> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(searchCounter_result.class, metaDataMap);
    }

    public searchCounter_result() {
    }

    public searchCounter_result(
      List<Counter> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public searchCounter_result(searchCounter_result other) {
      if (other.isSetSuccess()) {
        List<Counter> __this__success = new ArrayList<Counter>();
        for (Counter other_element : other.success) {
          __this__success.add(new Counter(other_element));
        }
        this.success = __this__success;
      }
    }

    public searchCounter_result deepCopy() {
      return new searchCounter_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Counter> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Counter elem) {
      if (this.success == null) {
        this.success = new ArrayList<Counter>();
      }
      this.success.add(elem);
    }

    public List<Counter> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Counter> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Counter>)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 searchCounter_result)
        return this.equals((searchCounter_result)that);
      return false;
    }

    public boolean equals(searchCounter_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(searchCounter_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      searchCounter_result typedOther = (searchCounter_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list133 = iprot.readListBegin();
                this.success = new ArrayList<Counter>(_list133.size);
                for (int _i134 = 0; _i134 < _list133.size; ++_i134)
                {
                  Counter _elem135; // required
                  _elem135 = new Counter();
                  _elem135.read(iprot);
                  this.success.add(_elem135);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Counter _iter136 : this.success)
          {
            _iter136.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("searchCounter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCounterByUserId_args implements org.apache.thrift.TBase<getCounterByUserId_args, getCounterByUserId_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterByUserId_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCounterByUserId_args.class, metaDataMap);
    }

    public getCounterByUserId_args() {
    }

    public getCounterByUserId_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCounterByUserId_args(getCounterByUserId_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getCounterByUserId_args deepCopy() {
      return new getCounterByUserId_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCounterByUserId_args)
        return this.equals((getCounterByUserId_args)that);
      return false;
    }

    public boolean equals(getCounterByUserId_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCounterByUserId_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCounterByUserId_args typedOther = (getCounterByUserId_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCounterByUserId_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCounterByUserId_result implements org.apache.thrift.TBase<getCounterByUserId_result, getCounterByUserId_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterByUserId_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 Counter 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCounterByUserId_result.class, metaDataMap);
    }

    public getCounterByUserId_result() {
    }

    public getCounterByUserId_result(
      Counter success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCounterByUserId_result(getCounterByUserId_result other) {
      if (other.isSetSuccess()) {
        this.success = new Counter(other.success);
      }
    }

    public getCounterByUserId_result deepCopy() {
      return new getCounterByUserId_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public Counter getSuccess() {
      return this.success;
    }

    public void setSuccess(Counter success) {
      this.success = success;
    }

    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((Counter)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 getCounterByUserId_result)
        return this.equals((getCounterByUserId_result)that);
      return false;
    }

    public boolean equals(getCounterByUserId_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(getCounterByUserId_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCounterByUserId_result typedOther = (getCounterByUserId_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Counter();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCounterByUserId_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUsersByCounter_args implements org.apache.thrift.TBase<getAllUsersByCounter_args, getAllUsersByCounter_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUsersByCounter_args");

    private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long counterId; // 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 {
      COUNTER_ID((short)1, "counterId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // COUNTER_ID
            return COUNTER_ID;
          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 __COUNTERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUsersByCounter_args.class, metaDataMap);
    }

    public getAllUsersByCounter_args() {
    }

    public getAllUsersByCounter_args(
      long counterId)
    {
      this();
      this.counterId = counterId;
      setCounterIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUsersByCounter_args(getAllUsersByCounter_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.counterId = other.counterId;
    }

    public getAllUsersByCounter_args deepCopy() {
      return new getAllUsersByCounter_args(this);
    }

    @Override
    public void clear() {
      setCounterIdIsSet(false);
      this.counterId = 0;
    }

    public long getCounterId() {
      return this.counterId;
    }

    public void setCounterId(long counterId) {
      this.counterId = counterId;
      setCounterIdIsSet(true);
    }

    public void unsetCounterId() {
      __isset_bit_vector.clear(__COUNTERID_ISSET_ID);
    }

    /** Returns true if field counterId is set (has been assigned a value) and false otherwise */
    public boolean isSetCounterId() {
      return __isset_bit_vector.get(__COUNTERID_ISSET_ID);
    }

    public void setCounterIdIsSet(boolean value) {
      __isset_bit_vector.set(__COUNTERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COUNTER_ID:
        if (value == null) {
          unsetCounterId();
        } else {
          setCounterId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COUNTER_ID:
        return Long.valueOf(getCounterId());

      }
      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 COUNTER_ID:
        return isSetCounterId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllUsersByCounter_args)
        return this.equals((getAllUsersByCounter_args)that);
      return false;
    }

    public boolean equals(getAllUsersByCounter_args that) {
      if (that == null)
        return false;

      boolean this_present_counterId = true;
      boolean that_present_counterId = true;
      if (this_present_counterId || that_present_counterId) {
        if (!(this_present_counterId && that_present_counterId))
          return false;
        if (this.counterId != that.counterId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllUsersByCounter_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUsersByCounter_args typedOther = (getAllUsersByCounter_args)other;

      lastComparison = Boolean.valueOf(isSetCounterId()).compareTo(typedOther.isSetCounterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCounterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counterId, typedOther.counterId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // COUNTER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.counterId = iprot.readI64();
              setCounterIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(COUNTER_ID_FIELD_DESC);
      oprot.writeI64(this.counterId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUsersByCounter_args(");
      boolean first = true;

      sb.append("counterId:");
      sb.append(this.counterId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllUsersByCounter_result implements org.apache.thrift.TBase<getAllUsersByCounter_result, getAllUsersByCounter_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUsersByCounter_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<User> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, User.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUsersByCounter_result.class, metaDataMap);
    }

    public getAllUsersByCounter_result() {
    }

    public getAllUsersByCounter_result(
      List<User> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllUsersByCounter_result(getAllUsersByCounter_result other) {
      if (other.isSetSuccess()) {
        List<User> __this__success = new ArrayList<User>();
        for (User other_element : other.success) {
          __this__success.add(new User(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllUsersByCounter_result deepCopy() {
      return new getAllUsersByCounter_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<User> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(User elem) {
      if (this.success == null) {
        this.success = new ArrayList<User>();
      }
      this.success.add(elem);
    }

    public List<User> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<User> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<User>)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 getAllUsersByCounter_result)
        return this.equals((getAllUsersByCounter_result)that);
      return false;
    }

    public boolean equals(getAllUsersByCounter_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(getAllUsersByCounter_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllUsersByCounter_result typedOther = (getAllUsersByCounter_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list137 = iprot.readListBegin();
                this.success = new ArrayList<User>(_list137.size);
                for (int _i138 = 0; _i138 < _list137.size; ++_i138)
                {
                  User _elem139; // required
                  _elem139 = new User();
                  _elem139.read(iprot);
                  this.success.add(_elem139);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (User _iter140 : this.success)
          {
            _iter140.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllUsersByCounter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getActiveAccessTokenForUser_args implements org.apache.thrift.TBase<getActiveAccessTokenForUser_args, getActiveAccessTokenForUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveAccessTokenForUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)2);

    private long userId; // required
    private String source; // 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 {
      USER_ID((short)1, "userId"),
      SOURCE((short)2, "source");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          case 2: // SOURCE
            return SOURCE;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", 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(getActiveAccessTokenForUser_args.class, metaDataMap);
    }

    public getActiveAccessTokenForUser_args() {
    }

    public getActiveAccessTokenForUser_args(
      long userId,
      String source)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
      this.source = source;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getActiveAccessTokenForUser_args(getActiveAccessTokenForUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
      if (other.isSetSource()) {
        this.source = other.source;
      }
    }

    public getActiveAccessTokenForUser_args deepCopy() {
      return new getActiveAccessTokenForUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      this.source = null;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public String getSource() {
      return this.source;
    }

    public void setSource(String source) {
      this.source = source;
    }

    public void unsetSource() {
      this.source = null;
    }

    /** Returns true if field source is set (has been assigned a value) and false otherwise */
    public boolean isSetSource() {
      return this.source != null;
    }

    public void setSourceIsSet(boolean value) {
      if (!value) {
        this.source = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      case SOURCE:
        if (value == null) {
          unsetSource();
        } else {
          setSource((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      case SOURCE:
        return getSource();

      }
      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 USER_ID:
        return isSetUserId();
      case SOURCE:
        return isSetSource();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getActiveAccessTokenForUser_args)
        return this.equals((getActiveAccessTokenForUser_args)that);
      return false;
    }

    public boolean equals(getActiveAccessTokenForUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      boolean this_present_source = true && this.isSetSource();
      boolean that_present_source = true && that.isSetSource();
      if (this_present_source || that_present_source) {
        if (!(this_present_source && that_present_source))
          return false;
        if (!this.source.equals(that.source))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getActiveAccessTokenForUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getActiveAccessTokenForUser_args typedOther = (getActiveAccessTokenForUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.source = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      if (this.source != null) {
        oprot.writeFieldBegin(SOURCE_FIELD_DESC);
        oprot.writeString(this.source);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getActiveAccessTokenForUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("source:");
      if (this.source == null) {
        sb.append("null");
      } else {
        sb.append(this.source);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getActiveAccessTokenForUser_result implements org.apache.thrift.TBase<getActiveAccessTokenForUser_result, getActiveAccessTokenForUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveAccessTokenForUser_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

    private String 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveAccessTokenForUser_result.class, metaDataMap);
    }

    public getActiveAccessTokenForUser_result() {
    }

    public getActiveAccessTokenForUser_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getActiveAccessTokenForUser_result(getActiveAccessTokenForUser_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

    public getActiveAccessTokenForUser_result deepCopy() {
      return new getActiveAccessTokenForUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getActiveAccessTokenForUser_result)
        return this.equals((getActiveAccessTokenForUser_result)that);
      return false;
    }

    public boolean equals(getActiveAccessTokenForUser_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(getActiveAccessTokenForUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getActiveAccessTokenForUser_result typedOther = (getActiveAccessTokenForUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getActiveAccessTokenForUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateAccessToken_args implements org.apache.thrift.TBase<validateAccessToken_args, validateAccessToken_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateAccessToken_args");

    private static final org.apache.thrift.protocol.TField ACCESS_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("accessToken", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String accessToken; // 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 {
      ACCESS_TOKEN((short)1, "accessToken");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ACCESS_TOKEN
            return ACCESS_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.ACCESS_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("accessToken", 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(validateAccessToken_args.class, metaDataMap);
    }

    public validateAccessToken_args() {
    }

    public validateAccessToken_args(
      String accessToken)
    {
      this();
      this.accessToken = accessToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateAccessToken_args(validateAccessToken_args other) {
      if (other.isSetAccessToken()) {
        this.accessToken = other.accessToken;
      }
    }

    public validateAccessToken_args deepCopy() {
      return new validateAccessToken_args(this);
    }

    @Override
    public void clear() {
      this.accessToken = null;
    }

    public String getAccessToken() {
      return this.accessToken;
    }

    public void setAccessToken(String accessToken) {
      this.accessToken = accessToken;
    }

    public void unsetAccessToken() {
      this.accessToken = null;
    }

    /** Returns true if field accessToken is set (has been assigned a value) and false otherwise */
    public boolean isSetAccessToken() {
      return this.accessToken != null;
    }

    public void setAccessTokenIsSet(boolean value) {
      if (!value) {
        this.accessToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ACCESS_TOKEN:
        if (value == null) {
          unsetAccessToken();
        } else {
          setAccessToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ACCESS_TOKEN:
        return getAccessToken();

      }
      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 ACCESS_TOKEN:
        return isSetAccessToken();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateAccessToken_args)
        return this.equals((validateAccessToken_args)that);
      return false;
    }

    public boolean equals(validateAccessToken_args that) {
      if (that == null)
        return false;

      boolean this_present_accessToken = true && this.isSetAccessToken();
      boolean that_present_accessToken = true && that.isSetAccessToken();
      if (this_present_accessToken || that_present_accessToken) {
        if (!(this_present_accessToken && that_present_accessToken))
          return false;
        if (!this.accessToken.equals(that.accessToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateAccessToken_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateAccessToken_args typedOther = (validateAccessToken_args)other;

      lastComparison = Boolean.valueOf(isSetAccessToken()).compareTo(typedOther.isSetAccessToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAccessToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessToken, typedOther.accessToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ACCESS_TOKEN
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.accessToken = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.accessToken != null) {
        oprot.writeFieldBegin(ACCESS_TOKEN_FIELD_DESC);
        oprot.writeString(this.accessToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateAccessToken_args(");
      boolean first = true;

      sb.append("accessToken:");
      if (this.accessToken == null) {
        sb.append("null");
      } else {
        sb.append(this.accessToken);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateAccessToken_result implements org.apache.thrift.TBase<validateAccessToken_result, validateAccessToken_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateAccessToken_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateAccessToken_result.class, metaDataMap);
    }

    public validateAccessToken_result() {
    }

    public validateAccessToken_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateAccessToken_result(validateAccessToken_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public validateAccessToken_result deepCopy() {
      return new validateAccessToken_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 validateAccessToken_result)
        return this.equals((validateAccessToken_result)that);
      return false;
    }

    public boolean equals(validateAccessToken_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(validateAccessToken_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateAccessToken_result typedOther = (validateAccessToken_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateAccessToken_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addItemsToCart_args implements org.apache.thrift.TBase<addItemsToCart_args, addItemsToCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsToCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("itemQty", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)3);

    private long cartId; // required
    private List<ItemQuantity> itemQty; // required
    private String couponCode; // 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 {
      CART_ID((short)1, "cartId"),
      ITEM_QTY((short)2, "itemQty"),
      COUPON_CODE((short)3, "couponCode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // ITEM_QTY
            return ITEM_QTY;
          case 3: // COUPON_CODE
            return COUPON_CODE;
          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 __CARTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_QTY, new org.apache.thrift.meta_data.FieldMetaData("itemQty", 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, ItemQuantity.class))));
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", 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(addItemsToCart_args.class, metaDataMap);
    }

    public addItemsToCart_args() {
    }

    public addItemsToCart_args(
      long cartId,
      List<ItemQuantity> itemQty,
      String couponCode)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.itemQty = itemQty;
      this.couponCode = couponCode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addItemsToCart_args(addItemsToCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      if (other.isSetItemQty()) {
        List<ItemQuantity> __this__itemQty = new ArrayList<ItemQuantity>();
        for (ItemQuantity other_element : other.itemQty) {
          __this__itemQty.add(new ItemQuantity(other_element));
        }
        this.itemQty = __this__itemQty;
      }
      if (other.isSetCouponCode()) {
        this.couponCode = other.couponCode;
      }
    }

    public addItemsToCart_args deepCopy() {
      return new addItemsToCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      this.itemQty = null;
      this.couponCode = null;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public int getItemQtySize() {
      return (this.itemQty == null) ? 0 : this.itemQty.size();
    }

    public java.util.Iterator<ItemQuantity> getItemQtyIterator() {
      return (this.itemQty == null) ? null : this.itemQty.iterator();
    }

    public void addToItemQty(ItemQuantity elem) {
      if (this.itemQty == null) {
        this.itemQty = new ArrayList<ItemQuantity>();
      }
      this.itemQty.add(elem);
    }

    public List<ItemQuantity> getItemQty() {
      return this.itemQty;
    }

    public void setItemQty(List<ItemQuantity> itemQty) {
      this.itemQty = itemQty;
    }

    public void unsetItemQty() {
      this.itemQty = null;
    }

    /** Returns true if field itemQty is set (has been assigned a value) and false otherwise */
    public boolean isSetItemQty() {
      return this.itemQty != null;
    }

    public void setItemQtyIsSet(boolean value) {
      if (!value) {
        this.itemQty = null;
      }
    }

    public String getCouponCode() {
      return this.couponCode;
    }

    public void setCouponCode(String couponCode) {
      this.couponCode = couponCode;
    }

    public void unsetCouponCode() {
      this.couponCode = null;
    }

    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
    public boolean isSetCouponCode() {
      return this.couponCode != null;
    }

    public void setCouponCodeIsSet(boolean value) {
      if (!value) {
        this.couponCode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case ITEM_QTY:
        if (value == null) {
          unsetItemQty();
        } else {
          setItemQty((List<ItemQuantity>)value);
        }
        break;

      case COUPON_CODE:
        if (value == null) {
          unsetCouponCode();
        } else {
          setCouponCode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case ITEM_QTY:
        return getItemQty();

      case COUPON_CODE:
        return getCouponCode();

      }
      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 CART_ID:
        return isSetCartId();
      case ITEM_QTY:
        return isSetItemQty();
      case COUPON_CODE:
        return isSetCouponCode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addItemsToCart_args)
        return this.equals((addItemsToCart_args)that);
      return false;
    }

    public boolean equals(addItemsToCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_itemQty = true && this.isSetItemQty();
      boolean that_present_itemQty = true && that.isSetItemQty();
      if (this_present_itemQty || that_present_itemQty) {
        if (!(this_present_itemQty && that_present_itemQty))
          return false;
        if (!this.itemQty.equals(that.itemQty))
          return false;
      }

      boolean this_present_couponCode = true && this.isSetCouponCode();
      boolean that_present_couponCode = true && that.isSetCouponCode();
      if (this_present_couponCode || that_present_couponCode) {
        if (!(this_present_couponCode && that_present_couponCode))
          return false;
        if (!this.couponCode.equals(that.couponCode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addItemsToCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addItemsToCart_args typedOther = (addItemsToCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItemQty()).compareTo(typedOther.isSetItemQty());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemQty()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemQty, typedOther.itemQty);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCouponCode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_QTY
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list141 = iprot.readListBegin();
                this.itemQty = new ArrayList<ItemQuantity>(_list141.size);
                for (int _i142 = 0; _i142 < _list141.size; ++_i142)
                {
                  ItemQuantity _elem143; // required
                  _elem143 = new ItemQuantity();
                  _elem143.read(iprot);
                  this.itemQty.add(_elem143);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // COUPON_CODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.couponCode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      if (this.itemQty != null) {
        oprot.writeFieldBegin(ITEM_QTY_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.itemQty.size()));
          for (ItemQuantity _iter144 : this.itemQty)
          {
            _iter144.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (this.couponCode != null) {
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
        oprot.writeString(this.couponCode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addItemsToCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("itemQty:");
      if (this.itemQty == null) {
        sb.append("null");
      } else {
        sb.append(this.itemQty);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("couponCode:");
      if (this.couponCode == null) {
        sb.append("null");
      } else {
        sb.append(this.couponCode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addItemsToCart_result implements org.apache.thrift.TBase<addItemsToCart_result, addItemsToCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsToCart_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemsToCart_result.class, metaDataMap);
    }

    public addItemsToCart_result() {
    }

    public addItemsToCart_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addItemsToCart_result(addItemsToCart_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public addItemsToCart_result deepCopy() {
      return new addItemsToCart_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 addItemsToCart_result)
        return this.equals((addItemsToCart_result)that);
      return false;
    }

    public boolean equals(addItemsToCart_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(addItemsToCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addItemsToCart_result typedOther = (addItemsToCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addItemsToCart_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartNew_args implements org.apache.thrift.TBase<validateCartNew_args, validateCartNew_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartNew_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField PIN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pinCode", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)3);

    private long cartId; // required
    private String pinCode; // required
    private long sourceId; // 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 {
      CART_ID((short)1, "cartId"),
      PIN_CODE((short)2, "pinCode"),
      SOURCE_ID((short)3, "sourceId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // PIN_CODE
            return PIN_CODE;
          case 3: // SOURCE_ID
            return SOURCE_ID;
          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 __CARTID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.PIN_CODE, new org.apache.thrift.meta_data.FieldMetaData("pinCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCartNew_args.class, metaDataMap);
    }

    public validateCartNew_args() {
    }

    public validateCartNew_args(
      long cartId,
      String pinCode,
      long sourceId)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.pinCode = pinCode;
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartNew_args(validateCartNew_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      if (other.isSetPinCode()) {
        this.pinCode = other.pinCode;
      }
      this.sourceId = other.sourceId;
    }

    public validateCartNew_args deepCopy() {
      return new validateCartNew_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      this.pinCode = null;
      setSourceIdIsSet(false);
      this.sourceId = 0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public String getPinCode() {
      return this.pinCode;
    }

    public void setPinCode(String pinCode) {
      this.pinCode = pinCode;
    }

    public void unsetPinCode() {
      this.pinCode = null;
    }

    /** Returns true if field pinCode is set (has been assigned a value) and false otherwise */
    public boolean isSetPinCode() {
      return this.pinCode != null;
    }

    public void setPinCodeIsSet(boolean value) {
      if (!value) {
        this.pinCode = null;
      }
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case PIN_CODE:
        if (value == null) {
          unsetPinCode();
        } else {
          setPinCode((String)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case PIN_CODE:
        return getPinCode();

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      }
      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 CART_ID:
        return isSetCartId();
      case PIN_CODE:
        return isSetPinCode();
      case SOURCE_ID:
        return isSetSourceId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartNew_args)
        return this.equals((validateCartNew_args)that);
      return false;
    }

    public boolean equals(validateCartNew_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_pinCode = true && this.isSetPinCode();
      boolean that_present_pinCode = true && that.isSetPinCode();
      if (this_present_pinCode || that_present_pinCode) {
        if (!(this_present_pinCode && that_present_pinCode))
          return false;
        if (!this.pinCode.equals(that.pinCode))
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(validateCartNew_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartNew_args typedOther = (validateCartNew_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPinCode()).compareTo(typedOther.isSetPinCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPinCode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinCode, typedOther.pinCode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PIN_CODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.pinCode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      if (this.pinCode != null) {
        oprot.writeFieldBegin(PIN_CODE_FIELD_DESC);
        oprot.writeString(this.pinCode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartNew_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("pinCode:");
      if (this.pinCode == null) {
        sb.append("null");
      } else {
        sb.append(this.pinCode);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class validateCartNew_result implements org.apache.thrift.TBase<validateCartNew_result, validateCartNew_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateCartNew_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

    private String 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateCartNew_result.class, metaDataMap);
    }

    public validateCartNew_result() {
    }

    public validateCartNew_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public validateCartNew_result(validateCartNew_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

    public validateCartNew_result deepCopy() {
      return new validateCartNew_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof validateCartNew_result)
        return this.equals((validateCartNew_result)that);
      return false;
    }

    public boolean equals(validateCartNew_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(validateCartNew_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      validateCartNew_result typedOther = (validateCartNew_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("validateCartNew_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isAddressEditableForCounter_args implements org.apache.thrift.TBase<isAddressEditableForCounter_args, isAddressEditableForCounter_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAddressEditableForCounter_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAddressEditableForCounter_args.class, metaDataMap);
    }

    public isAddressEditableForCounter_args() {
    }

    public isAddressEditableForCounter_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isAddressEditableForCounter_args(isAddressEditableForCounter_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public isAddressEditableForCounter_args deepCopy() {
      return new isAddressEditableForCounter_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isAddressEditableForCounter_args)
        return this.equals((isAddressEditableForCounter_args)that);
      return false;
    }

    public boolean equals(isAddressEditableForCounter_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isAddressEditableForCounter_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isAddressEditableForCounter_args typedOther = (isAddressEditableForCounter_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isAddressEditableForCounter_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isAddressEditableForCounter_result implements org.apache.thrift.TBase<isAddressEditableForCounter_result, isAddressEditableForCounter_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAddressEditableForCounter_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAddressEditableForCounter_result.class, metaDataMap);
    }

    public isAddressEditableForCounter_result() {
    }

    public isAddressEditableForCounter_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isAddressEditableForCounter_result(isAddressEditableForCounter_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isAddressEditableForCounter_result deepCopy() {
      return new isAddressEditableForCounter_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 isAddressEditableForCounter_result)
        return this.equals((isAddressEditableForCounter_result)that);
      return false;
    }

    public boolean equals(isAddressEditableForCounter_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(isAddressEditableForCounter_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isAddressEditableForCounter_result typedOther = (isAddressEditableForCounter_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isAddressEditableForCounter_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBillingAddressForUser_args implements org.apache.thrift.TBase<getBillingAddressForUser_args, getBillingAddressForUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBillingAddressForUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBillingAddressForUser_args.class, metaDataMap);
    }

    public getBillingAddressForUser_args() {
    }

    public getBillingAddressForUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBillingAddressForUser_args(getBillingAddressForUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public getBillingAddressForUser_args deepCopy() {
      return new getBillingAddressForUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getBillingAddressForUser_args)
        return this.equals((getBillingAddressForUser_args)that);
      return false;
    }

    public boolean equals(getBillingAddressForUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getBillingAddressForUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBillingAddressForUser_args typedOther = (getBillingAddressForUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBillingAddressForUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBillingAddressForUser_result implements org.apache.thrift.TBase<getBillingAddressForUser_result, getBillingAddressForUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBillingAddressForUser_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 Address 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBillingAddressForUser_result.class, metaDataMap);
    }

    public getBillingAddressForUser_result() {
    }

    public getBillingAddressForUser_result(
      Address success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBillingAddressForUser_result(getBillingAddressForUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new Address(other.success);
      }
    }

    public getBillingAddressForUser_result deepCopy() {
      return new getBillingAddressForUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public Address getSuccess() {
      return this.success;
    }

    public void setSuccess(Address success) {
      this.success = success;
    }

    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((Address)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 getBillingAddressForUser_result)
        return this.equals((getBillingAddressForUser_result)that);
      return false;
    }

    public boolean equals(getBillingAddressForUser_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(getBillingAddressForUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBillingAddressForUser_result typedOther = (getBillingAddressForUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Address();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBillingAddressForUser_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isCreditorAssigned_args implements org.apache.thrift.TBase<isCreditorAssigned_args, isCreditorAssigned_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCreditorAssigned_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCreditorAssigned_args.class, metaDataMap);
    }

    public isCreditorAssigned_args() {
    }

    public isCreditorAssigned_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isCreditorAssigned_args(isCreditorAssigned_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public isCreditorAssigned_args deepCopy() {
      return new isCreditorAssigned_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isCreditorAssigned_args)
        return this.equals((isCreditorAssigned_args)that);
      return false;
    }

    public boolean equals(isCreditorAssigned_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isCreditorAssigned_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isCreditorAssigned_args typedOther = (isCreditorAssigned_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isCreditorAssigned_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isCreditorAssigned_result implements org.apache.thrift.TBase<isCreditorAssigned_result, isCreditorAssigned_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCreditorAssigned_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCreditorAssigned_result.class, metaDataMap);
    }

    public isCreditorAssigned_result() {
    }

    public isCreditorAssigned_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isCreditorAssigned_result(isCreditorAssigned_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isCreditorAssigned_result deepCopy() {
      return new isCreditorAssigned_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 isCreditorAssigned_result)
        return this.equals((isCreditorAssigned_result)that);
      return false;
    }

    public boolean equals(isCreditorAssigned_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(isCreditorAssigned_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isCreditorAssigned_result typedOther = (isCreditorAssigned_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isCreditorAssigned_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isTaxInvoiceEnabledUser_args implements org.apache.thrift.TBase<isTaxInvoiceEnabledUser_args, isTaxInvoiceEnabledUser_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTaxInvoiceEnabledUser_args");

    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long userId; // 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 {
      USER_ID((short)1, "userId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_ID
            return USER_ID;
          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 __USERID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTaxInvoiceEnabledUser_args.class, metaDataMap);
    }

    public isTaxInvoiceEnabledUser_args() {
    }

    public isTaxInvoiceEnabledUser_args(
      long userId)
    {
      this();
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isTaxInvoiceEnabledUser_args(isTaxInvoiceEnabledUser_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.userId = other.userId;
    }

    public isTaxInvoiceEnabledUser_args deepCopy() {
      return new isTaxInvoiceEnabledUser_args(this);
    }

    @Override
    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
    }

    public long getUserId() {
      return this.userId;
    }

    public void setUserId(long userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    public void unsetUserId() {
      __isset_bit_vector.clear(__USERID_ISSET_ID);
    }

    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_bit_vector.get(__USERID_ISSET_ID);
    }

    public void setUserIdIsSet(boolean value) {
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_ID:
        return Long.valueOf(getUserId());

      }
      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 USER_ID:
        return isSetUserId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isTaxInvoiceEnabledUser_args)
        return this.equals((isTaxInvoiceEnabledUser_args)that);
      return false;
    }

    public boolean equals(isTaxInvoiceEnabledUser_args that) {
      if (that == null)
        return false;

      boolean this_present_userId = true;
      boolean that_present_userId = true;
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (this.userId != that.userId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isTaxInvoiceEnabledUser_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isTaxInvoiceEnabledUser_args typedOther = (isTaxInvoiceEnabledUser_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.userId = iprot.readI64();
              setUserIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI64(this.userId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isTaxInvoiceEnabledUser_args(");
      boolean first = true;

      sb.append("userId:");
      sb.append(this.userId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isTaxInvoiceEnabledUser_result implements org.apache.thrift.TBase<isTaxInvoiceEnabledUser_result, isTaxInvoiceEnabledUser_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTaxInvoiceEnabledUser_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTaxInvoiceEnabledUser_result.class, metaDataMap);
    }

    public isTaxInvoiceEnabledUser_result() {
    }

    public isTaxInvoiceEnabledUser_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isTaxInvoiceEnabledUser_result(isTaxInvoiceEnabledUser_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isTaxInvoiceEnabledUser_result deepCopy() {
      return new isTaxInvoiceEnabledUser_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 isTaxInvoiceEnabledUser_result)
        return this.equals((isTaxInvoiceEnabledUser_result)that);
      return false;
    }

    public boolean equals(isTaxInvoiceEnabledUser_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(isTaxInvoiceEnabledUser_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isTaxInvoiceEnabledUser_result typedOther = (isTaxInvoiceEnabledUser_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isTaxInvoiceEnabledUser_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class taxInvoiceAvailable_args implements org.apache.thrift.TBase<taxInvoiceAvailable_args, taxInvoiceAvailable_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("taxInvoiceAvailable_args");

    private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long addressId; // 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 {
      ADDRESS_ID((short)1, "addressId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ADDRESS_ID
            return ADDRESS_ID;
          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 __ADDRESSID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(taxInvoiceAvailable_args.class, metaDataMap);
    }

    public taxInvoiceAvailable_args() {
    }

    public taxInvoiceAvailable_args(
      long addressId)
    {
      this();
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public taxInvoiceAvailable_args(taxInvoiceAvailable_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.addressId = other.addressId;
    }

    public taxInvoiceAvailable_args deepCopy() {
      return new taxInvoiceAvailable_args(this);
    }

    @Override
    public void clear() {
      setAddressIdIsSet(false);
      this.addressId = 0;
    }

    public long getAddressId() {
      return this.addressId;
    }

    public void setAddressId(long addressId) {
      this.addressId = addressId;
      setAddressIdIsSet(true);
    }

    public void unsetAddressId() {
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
    }

    /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
    public boolean isSetAddressId() {
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
    }

    public void setAddressIdIsSet(boolean value) {
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ADDRESS_ID:
        if (value == null) {
          unsetAddressId();
        } else {
          setAddressId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ADDRESS_ID:
        return Long.valueOf(getAddressId());

      }
      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 ADDRESS_ID:
        return isSetAddressId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof taxInvoiceAvailable_args)
        return this.equals((taxInvoiceAvailable_args)that);
      return false;
    }

    public boolean equals(taxInvoiceAvailable_args that) {
      if (that == null)
        return false;

      boolean this_present_addressId = true;
      boolean that_present_addressId = true;
      if (this_present_addressId || that_present_addressId) {
        if (!(this_present_addressId && that_present_addressId))
          return false;
        if (this.addressId != that.addressId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(taxInvoiceAvailable_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      taxInvoiceAvailable_args typedOther = (taxInvoiceAvailable_args)other;

      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddressId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ADDRESS_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.addressId = iprot.readI64();
              setAddressIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
      oprot.writeI64(this.addressId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("taxInvoiceAvailable_args(");
      boolean first = true;

      sb.append("addressId:");
      sb.append(this.addressId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class taxInvoiceAvailable_result implements org.apache.thrift.TBase<taxInvoiceAvailable_result, taxInvoiceAvailable_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("taxInvoiceAvailable_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(taxInvoiceAvailable_result.class, metaDataMap);
    }

    public taxInvoiceAvailable_result() {
    }

    public taxInvoiceAvailable_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public taxInvoiceAvailable_result(taxInvoiceAvailable_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public taxInvoiceAvailable_result deepCopy() {
      return new taxInvoiceAvailable_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 taxInvoiceAvailable_result)
        return this.equals((taxInvoiceAvailable_result)that);
      return false;
    }

    public boolean equals(taxInvoiceAvailable_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(taxInvoiceAvailable_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      taxInvoiceAvailable_result typedOther = (taxInvoiceAvailable_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("taxInvoiceAvailable_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartByValue_args implements org.apache.thrift.TBase<getCartByValue_args, getCartByValue_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartByValue_args");

    private static final org.apache.thrift.protocol.TField CART_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("cartIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> cartIds; // 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 {
      CART_IDS((short)1, "cartIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_IDS
            return CART_IDS;
          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.CART_IDS, new org.apache.thrift.meta_data.FieldMetaData("cartIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCartByValue_args.class, metaDataMap);
    }

    public getCartByValue_args() {
    }

    public getCartByValue_args(
      List<Long> cartIds)
    {
      this();
      this.cartIds = cartIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartByValue_args(getCartByValue_args other) {
      if (other.isSetCartIds()) {
        List<Long> __this__cartIds = new ArrayList<Long>();
        for (Long other_element : other.cartIds) {
          __this__cartIds.add(other_element);
        }
        this.cartIds = __this__cartIds;
      }
    }

    public getCartByValue_args deepCopy() {
      return new getCartByValue_args(this);
    }

    @Override
    public void clear() {
      this.cartIds = null;
    }

    public int getCartIdsSize() {
      return (this.cartIds == null) ? 0 : this.cartIds.size();
    }

    public java.util.Iterator<Long> getCartIdsIterator() {
      return (this.cartIds == null) ? null : this.cartIds.iterator();
    }

    public void addToCartIds(long elem) {
      if (this.cartIds == null) {
        this.cartIds = new ArrayList<Long>();
      }
      this.cartIds.add(elem);
    }

    public List<Long> getCartIds() {
      return this.cartIds;
    }

    public void setCartIds(List<Long> cartIds) {
      this.cartIds = cartIds;
    }

    public void unsetCartIds() {
      this.cartIds = null;
    }

    /** Returns true if field cartIds is set (has been assigned a value) and false otherwise */
    public boolean isSetCartIds() {
      return this.cartIds != null;
    }

    public void setCartIdsIsSet(boolean value) {
      if (!value) {
        this.cartIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_IDS:
        if (value == null) {
          unsetCartIds();
        } else {
          setCartIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_IDS:
        return getCartIds();

      }
      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 CART_IDS:
        return isSetCartIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCartByValue_args)
        return this.equals((getCartByValue_args)that);
      return false;
    }

    public boolean equals(getCartByValue_args that) {
      if (that == null)
        return false;

      boolean this_present_cartIds = true && this.isSetCartIds();
      boolean that_present_cartIds = true && that.isSetCartIds();
      if (this_present_cartIds || that_present_cartIds) {
        if (!(this_present_cartIds && that_present_cartIds))
          return false;
        if (!this.cartIds.equals(that.cartIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCartByValue_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartByValue_args typedOther = (getCartByValue_args)other;

      lastComparison = Boolean.valueOf(isSetCartIds()).compareTo(typedOther.isSetCartIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartIds, typedOther.cartIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list145 = iprot.readListBegin();
                this.cartIds = new ArrayList<Long>(_list145.size);
                for (int _i146 = 0; _i146 < _list145.size; ++_i146)
                {
                  long _elem147; // required
                  _elem147 = iprot.readI64();
                  this.cartIds.add(_elem147);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.cartIds != null) {
        oprot.writeFieldBegin(CART_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.cartIds.size()));
          for (long _iter148 : this.cartIds)
          {
            oprot.writeI64(_iter148);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartByValue_args(");
      boolean first = true;

      sb.append("cartIds:");
      if (this.cartIds == null) {
        sb.append("null");
      } else {
        sb.append(this.cartIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCartByValue_result implements org.apache.thrift.TBase<getCartByValue_result, getCartByValue_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCartByValue_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 Map<Long,List<Line>> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
                  new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Line.class)))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCartByValue_result.class, metaDataMap);
    }

    public getCartByValue_result() {
    }

    public getCartByValue_result(
      Map<Long,List<Line>> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCartByValue_result(getCartByValue_result other) {
      if (other.isSetSuccess()) {
        Map<Long,List<Line>> __this__success = new HashMap<Long,List<Line>>();
        for (Map.Entry<Long, List<Line>> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          List<Line> other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          List<Line> __this__success_copy_value = new ArrayList<Line>();
          for (Line other_element_value_element : other_element_value) {
            __this__success_copy_value.add(new Line(other_element_value_element));
          }

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getCartByValue_result deepCopy() {
      return new getCartByValue_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, List<Line> val) {
      if (this.success == null) {
        this.success = new HashMap<Long,List<Line>>();
      }
      this.success.put(key, val);
    }

    public Map<Long,List<Line>> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,List<Line>> success) {
      this.success = success;
    }

    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<Long,List<Line>>)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 getCartByValue_result)
        return this.equals((getCartByValue_result)that);
      return false;
    }

    public boolean equals(getCartByValue_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(getCartByValue_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCartByValue_result typedOther = (getCartByValue_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map149 = iprot.readMapBegin();
                this.success = new HashMap<Long,List<Line>>(2*_map149.size);
                for (int _i150 = 0; _i150 < _map149.size; ++_i150)
                {
                  long _key151; // required
                  List<Line> _val152; // required
                  _key151 = iprot.readI64();
                  {
                    org.apache.thrift.protocol.TList _list153 = iprot.readListBegin();
                    _val152 = new ArrayList<Line>(_list153.size);
                    for (int _i154 = 0; _i154 < _list153.size; ++_i154)
                    {
                      Line _elem155; // required
                      _elem155 = new Line();
                      _elem155.read(iprot);
                      _val152.add(_elem155);
                    }
                    iprot.readListEnd();
                  }
                  this.success.put(_key151, _val152);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, this.success.size()));
          for (Map.Entry<Long, List<Line>> _iter156 : this.success.entrySet())
          {
            oprot.writeI64(_iter156.getKey());
            {
              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter156.getValue().size()));
              for (Line _iter157 : _iter156.getValue())
              {
                _iter157.write(oprot);
              }
              oprot.writeListEnd();
            }
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCartByValue_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCounterName_args implements org.apache.thrift.TBase<getCounterName_args, getCounterName_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterName_args");

    private static final org.apache.thrift.protocol.TField USER_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("userIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> userIds; // 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 {
      USER_IDS((short)1, "userIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // USER_IDS
            return USER_IDS;
          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.USER_IDS, new org.apache.thrift.meta_data.FieldMetaData("userIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCounterName_args.class, metaDataMap);
    }

    public getCounterName_args() {
    }

    public getCounterName_args(
      List<Long> userIds)
    {
      this();
      this.userIds = userIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCounterName_args(getCounterName_args other) {
      if (other.isSetUserIds()) {
        List<Long> __this__userIds = new ArrayList<Long>();
        for (Long other_element : other.userIds) {
          __this__userIds.add(other_element);
        }
        this.userIds = __this__userIds;
      }
    }

    public getCounterName_args deepCopy() {
      return new getCounterName_args(this);
    }

    @Override
    public void clear() {
      this.userIds = null;
    }

    public int getUserIdsSize() {
      return (this.userIds == null) ? 0 : this.userIds.size();
    }

    public java.util.Iterator<Long> getUserIdsIterator() {
      return (this.userIds == null) ? null : this.userIds.iterator();
    }

    public void addToUserIds(long elem) {
      if (this.userIds == null) {
        this.userIds = new ArrayList<Long>();
      }
      this.userIds.add(elem);
    }

    public List<Long> getUserIds() {
      return this.userIds;
    }

    public void setUserIds(List<Long> userIds) {
      this.userIds = userIds;
    }

    public void unsetUserIds() {
      this.userIds = null;
    }

    /** Returns true if field userIds is set (has been assigned a value) and false otherwise */
    public boolean isSetUserIds() {
      return this.userIds != null;
    }

    public void setUserIdsIsSet(boolean value) {
      if (!value) {
        this.userIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_IDS:
        if (value == null) {
          unsetUserIds();
        } else {
          setUserIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_IDS:
        return getUserIds();

      }
      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 USER_IDS:
        return isSetUserIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCounterName_args)
        return this.equals((getCounterName_args)that);
      return false;
    }

    public boolean equals(getCounterName_args that) {
      if (that == null)
        return false;

      boolean this_present_userIds = true && this.isSetUserIds();
      boolean that_present_userIds = true && that.isSetUserIds();
      if (this_present_userIds || that_present_userIds) {
        if (!(this_present_userIds && that_present_userIds))
          return false;
        if (!this.userIds.equals(that.userIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getCounterName_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCounterName_args typedOther = (getCounterName_args)other;

      lastComparison = Boolean.valueOf(isSetUserIds()).compareTo(typedOther.isSetUserIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userIds, typedOther.userIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list158 = iprot.readListBegin();
                this.userIds = new ArrayList<Long>(_list158.size);
                for (int _i159 = 0; _i159 < _list158.size; ++_i159)
                {
                  long _elem160; // required
                  _elem160 = iprot.readI64();
                  this.userIds.add(_elem160);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.userIds != null) {
        oprot.writeFieldBegin(USER_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.userIds.size()));
          for (long _iter161 : this.userIds)
          {
            oprot.writeI64(_iter161);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCounterName_args(");
      boolean first = true;

      sb.append("userIds:");
      if (this.userIds == null) {
        sb.append("null");
      } else {
        sb.append(this.userIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getCounterName_result implements org.apache.thrift.TBase<getCounterName_result, getCounterName_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterName_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 Map<Long,String> 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.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(getCounterName_result.class, metaDataMap);
    }

    public getCounterName_result() {
    }

    public getCounterName_result(
      Map<Long,String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCounterName_result(getCounterName_result other) {
      if (other.isSetSuccess()) {
        Map<Long,String> __this__success = new HashMap<Long,String>();
        for (Map.Entry<Long, String> 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 getCounterName_result deepCopy() {
      return new getCounterName_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 HashMap<Long,String>();
      }
      this.success.put(key, val);
    }

    public Map<Long,String> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,String> success) {
      this.success = success;
    }

    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<Long,String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getCounterName_result)
        return this.equals((getCounterName_result)that);
      return false;
    }

    public boolean equals(getCounterName_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(getCounterName_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCounterName_result typedOther = (getCounterName_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map162 = iprot.readMapBegin();
                this.success = new HashMap<Long,String>(2*_map162.size);
                for (int _i163 = 0; _i163 < _map162.size; ++_i163)
                {
                  long _key164; // required
                  String _val165; // required
                  _key164 = iprot.readI64();
                  _val165 = iprot.readString();
                  this.success.put(_key164, _val165);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (Map.Entry<Long, String> _iter166 : this.success.entrySet())
          {
            oprot.writeI64(_iter166.getKey());
            oprot.writeString(_iter166.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCounterName_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setWalletAmountInCart_args implements org.apache.thrift.TBase<setWalletAmountInCart_args, setWalletAmountInCart_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setWalletAmountInCart_args");

    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)2);

    private long cartId; // required
    private double wallet_amount; // 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 {
      CART_ID((short)1, "cartId"),
      WALLET_AMOUNT((short)2, "wallet_amount");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CART_ID
            return CART_ID;
          case 2: // WALLET_AMOUNT
            return WALLET_AMOUNT;
          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 __CARTID_ISSET_ID = 0;
    private static final int __WALLET_AMOUNT_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    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.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setWalletAmountInCart_args.class, metaDataMap);
    }

    public setWalletAmountInCart_args() {
    }

    public setWalletAmountInCart_args(
      long cartId,
      double wallet_amount)
    {
      this();
      this.cartId = cartId;
      setCartIdIsSet(true);
      this.wallet_amount = wallet_amount;
      setWallet_amountIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setWalletAmountInCart_args(setWalletAmountInCart_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.cartId = other.cartId;
      this.wallet_amount = other.wallet_amount;
    }

    public setWalletAmountInCart_args deepCopy() {
      return new setWalletAmountInCart_args(this);
    }

    @Override
    public void clear() {
      setCartIdIsSet(false);
      this.cartId = 0;
      setWallet_amountIsSet(false);
      this.wallet_amount = 0.0;
    }

    public long getCartId() {
      return this.cartId;
    }

    public void setCartId(long cartId) {
      this.cartId = cartId;
      setCartIdIsSet(true);
    }

    public void unsetCartId() {
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
    }

    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
    public boolean isSetCartId() {
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
    }

    public void setCartIdIsSet(boolean value) {
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
    }

    public double getWallet_amount() {
      return this.wallet_amount;
    }

    public void setWallet_amount(double wallet_amount) {
      this.wallet_amount = wallet_amount;
      setWallet_amountIsSet(true);
    }

    public void unsetWallet_amount() {
      __isset_bit_vector.clear(__WALLET_AMOUNT_ISSET_ID);
    }

    /** Returns true if field wallet_amount is set (has been assigned a value) and false otherwise */
    public boolean isSetWallet_amount() {
      return __isset_bit_vector.get(__WALLET_AMOUNT_ISSET_ID);
    }

    public void setWallet_amountIsSet(boolean value) {
      __isset_bit_vector.set(__WALLET_AMOUNT_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CART_ID:
        if (value == null) {
          unsetCartId();
        } else {
          setCartId((Long)value);
        }
        break;

      case WALLET_AMOUNT:
        if (value == null) {
          unsetWallet_amount();
        } else {
          setWallet_amount((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CART_ID:
        return Long.valueOf(getCartId());

      case WALLET_AMOUNT:
        return Double.valueOf(getWallet_amount());

      }
      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 CART_ID:
        return isSetCartId();
      case WALLET_AMOUNT:
        return isSetWallet_amount();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setWalletAmountInCart_args)
        return this.equals((setWalletAmountInCart_args)that);
      return false;
    }

    public boolean equals(setWalletAmountInCart_args that) {
      if (that == null)
        return false;

      boolean this_present_cartId = true;
      boolean that_present_cartId = true;
      if (this_present_cartId || that_present_cartId) {
        if (!(this_present_cartId && that_present_cartId))
          return false;
        if (this.cartId != that.cartId)
          return false;
      }

      boolean this_present_wallet_amount = true;
      boolean that_present_wallet_amount = true;
      if (this_present_wallet_amount || that_present_wallet_amount) {
        if (!(this_present_wallet_amount && that_present_wallet_amount))
          return false;
        if (this.wallet_amount != that.wallet_amount)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(setWalletAmountInCart_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setWalletAmountInCart_args typedOther = (setWalletAmountInCart_args)other;

      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCartId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWallet_amount()).compareTo(typedOther.isSetWallet_amount());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWallet_amount()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallet_amount, typedOther.wallet_amount);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CART_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.cartId = iprot.readI64();
              setCartIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WALLET_AMOUNT
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.wallet_amount = iprot.readDouble();
              setWallet_amountIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
      oprot.writeI64(this.cartId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);
      oprot.writeDouble(this.wallet_amount);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setWalletAmountInCart_args(");
      boolean first = true;

      sb.append("cartId:");
      sb.append(this.cartId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("wallet_amount:");
      sb.append(this.wallet_amount);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class setWalletAmountInCart_result implements org.apache.thrift.TBase<setWalletAmountInCart_result, setWalletAmountInCart_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setWalletAmountInCart_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 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<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setWalletAmountInCart_result.class, metaDataMap);
    }

    public setWalletAmountInCart_result() {
    }

    public setWalletAmountInCart_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setWalletAmountInCart_result(setWalletAmountInCart_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public setWalletAmountInCart_result deepCopy() {
      return new setWalletAmountInCart_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public 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 setWalletAmountInCart_result)
        return this.equals((setWalletAmountInCart_result)that);
      return false;
    }

    public boolean equals(setWalletAmountInCart_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(setWalletAmountInCart_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      setWalletAmountInCart_result typedOther = (setWalletAmountInCart_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setWalletAmountInCart_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
    }

    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);
      }
    }

  }

}