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

org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.9.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.hadoop.hive.metastore.api;

import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.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 ThriftHiveMetastore {

  /**
   * This interface is live.
   */
  public interface Iface extends com.facebook.fb303.FacebookService.Iface {

    public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException;

    public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException;

    public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException;

    public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException;

    public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException;

    public List get_all_databases() throws MetaException, org.apache.thrift.TException;

    public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException;

    public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException;

    public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException;

    public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException;

    public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException;

    public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException;

    public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException;

    public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException;

    public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_table_objects_by_name(String dbname, List tbl_names) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;

    public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;

    public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException;

    public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException;

    public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException;

    public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException;

    public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException;

    public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException;

    public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException;

    public boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException;

    public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;

    public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException;

    public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;

    public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;

    public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException;

    public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException;

    public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;

    public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException;

    public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException;

    public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;

    public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException;

    public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException;

    public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException;

    public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException;

    public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException;

    public List get_role_names() throws MetaException, org.apache.thrift.TException;

    public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException;

    public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException;

    public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException;

    public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException;

    public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException;

    public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException;

    public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException;

    public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException;

    public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException;

    public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException;

    public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException;

    public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException;

    public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException;

    public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException;

    public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException;

    public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException;

    public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException;

    public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException;

    public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException;

    public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;

    public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;

    public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException;

    public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException;

    public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException;

    public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;

    public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException;

    public void compact(CompactionRequest rqst) throws org.apache.thrift.TException;

    public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException;

    public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException;

    public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException;

    public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException;

    public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException;

  }

  public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface {

    public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

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

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

    public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException
    {
      send_getMetaConf(key);
      return recv_getMetaConf();
    }

    public void send_getMetaConf(String key) throws org.apache.thrift.TException
    {
      getMetaConf_args args = new getMetaConf_args();
      args.setKey(key);
      sendBase("getMetaConf", args);
    }

    public String recv_getMetaConf() throws MetaException, org.apache.thrift.TException
    {
      getMetaConf_result result = new getMetaConf_result();
      receiveBase(result, "getMetaConf");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result");
    }

    public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException
    {
      send_setMetaConf(key, value);
      recv_setMetaConf();
    }

    public void send_setMetaConf(String key, String value) throws org.apache.thrift.TException
    {
      setMetaConf_args args = new setMetaConf_args();
      args.setKey(key);
      args.setValue(value);
      sendBase("setMetaConf", args);
    }

    public void recv_setMetaConf() throws MetaException, org.apache.thrift.TException
    {
      setMetaConf_result result = new setMetaConf_result();
      receiveBase(result, "setMetaConf");
      if (result.o1 != null) {
        throw result.o1;
      }
      return;
    }

    public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
    {
      send_create_database(database);
      recv_create_database();
    }

    public void send_create_database(Database database) throws org.apache.thrift.TException
    {
      create_database_args args = new create_database_args();
      args.setDatabase(database);
      sendBase("create_database", args);
    }

    public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
    {
      create_database_result result = new create_database_result();
      receiveBase(result, "create_database");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      return;
    }

    public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      send_get_database(name);
      return recv_get_database();
    }

    public void send_get_database(String name) throws org.apache.thrift.TException
    {
      get_database_args args = new get_database_args();
      args.setName(name);
      sendBase("get_database", args);
    }

    public Database recv_get_database() throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      get_database_result result = new get_database_result();
      receiveBase(result, "get_database");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_database failed: unknown result");
    }

    public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
    {
      send_drop_database(name, deleteData, cascade);
      recv_drop_database();
    }

    public void send_drop_database(String name, boolean deleteData, boolean cascade) throws org.apache.thrift.TException
    {
      drop_database_args args = new drop_database_args();
      args.setName(name);
      args.setDeleteData(deleteData);
      args.setCascade(cascade);
      sendBase("drop_database", args);
    }

    public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
    {
      drop_database_result result = new drop_database_result();
      receiveBase(result, "drop_database");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      return;
    }

    public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException
    {
      send_get_databases(pattern);
      return recv_get_databases();
    }

    public void send_get_databases(String pattern) throws org.apache.thrift.TException
    {
      get_databases_args args = new get_databases_args();
      args.setPattern(pattern);
      sendBase("get_databases", args);
    }

    public List recv_get_databases() throws MetaException, org.apache.thrift.TException
    {
      get_databases_result result = new get_databases_result();
      receiveBase(result, "get_databases");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_databases failed: unknown result");
    }

    public List get_all_databases() throws MetaException, org.apache.thrift.TException
    {
      send_get_all_databases();
      return recv_get_all_databases();
    }

    public void send_get_all_databases() throws org.apache.thrift.TException
    {
      get_all_databases_args args = new get_all_databases_args();
      sendBase("get_all_databases", args);
    }

    public List recv_get_all_databases() throws MetaException, org.apache.thrift.TException
    {
      get_all_databases_result result = new get_all_databases_result();
      receiveBase(result, "get_all_databases");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result");
    }

    public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_alter_database(dbname, db);
      recv_alter_database();
    }

    public void send_alter_database(String dbname, Database db) throws org.apache.thrift.TException
    {
      alter_database_args args = new alter_database_args();
      args.setDbname(dbname);
      args.setDb(db);
      sendBase("alter_database", args);
    }

    public void recv_alter_database() throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      alter_database_result result = new alter_database_result();
      receiveBase(result, "alter_database");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      return;
    }

    public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_get_type(name);
      return recv_get_type();
    }

    public void send_get_type(String name) throws org.apache.thrift.TException
    {
      get_type_args args = new get_type_args();
      args.setName(name);
      sendBase("get_type", args);
    }

    public Type recv_get_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      get_type_result result = new get_type_result();
      receiveBase(result, "get_type");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type failed: unknown result");
    }

    public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
    {
      send_create_type(type);
      return recv_create_type();
    }

    public void send_create_type(Type type) throws org.apache.thrift.TException
    {
      create_type_args args = new create_type_args();
      args.setType(type);
      sendBase("create_type", args);
    }

    public boolean recv_create_type() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
    {
      create_type_result result = new create_type_result();
      receiveBase(result, "create_type");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_type failed: unknown result");
    }

    public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_drop_type(type);
      return recv_drop_type();
    }

    public void send_drop_type(String type) throws org.apache.thrift.TException
    {
      drop_type_args args = new drop_type_args();
      args.setType(type);
      sendBase("drop_type", args);
    }

    public boolean recv_drop_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      drop_type_result result = new drop_type_result();
      receiveBase(result, "drop_type");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_type failed: unknown result");
    }

    public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException
    {
      send_get_type_all(name);
      return recv_get_type_all();
    }

    public void send_get_type_all(String name) throws org.apache.thrift.TException
    {
      get_type_all_args args = new get_type_all_args();
      args.setName(name);
      sendBase("get_type_all", args);
    }

    public Map recv_get_type_all() throws MetaException, org.apache.thrift.TException
    {
      get_type_all_result result = new get_type_all_result();
      receiveBase(result, "get_type_all");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result");
    }

    public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      send_get_fields(db_name, table_name);
      return recv_get_fields();
    }

    public void send_get_fields(String db_name, String table_name) throws org.apache.thrift.TException
    {
      get_fields_args args = new get_fields_args();
      args.setDb_name(db_name);
      args.setTable_name(table_name);
      sendBase("get_fields", args);
    }

    public List recv_get_fields() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      get_fields_result result = new get_fields_result();
      receiveBase(result, "get_fields");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields failed: unknown result");
    }

    public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      send_get_fields_with_environment_context(db_name, table_name, environment_context);
      return recv_get_fields_with_environment_context();
    }

    public void send_get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException
    {
      get_fields_with_environment_context_args args = new get_fields_with_environment_context_args();
      args.setDb_name(db_name);
      args.setTable_name(table_name);
      args.setEnvironment_context(environment_context);
      sendBase("get_fields_with_environment_context", args);
    }

    public List recv_get_fields_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      get_fields_with_environment_context_result result = new get_fields_with_environment_context_result();
      receiveBase(result, "get_fields_with_environment_context");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result");
    }

    public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      send_get_schema(db_name, table_name);
      return recv_get_schema();
    }

    public void send_get_schema(String db_name, String table_name) throws org.apache.thrift.TException
    {
      get_schema_args args = new get_schema_args();
      args.setDb_name(db_name);
      args.setTable_name(table_name);
      sendBase("get_schema", args);
    }

    public List recv_get_schema() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      get_schema_result result = new get_schema_result();
      receiveBase(result, "get_schema");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema failed: unknown result");
    }

    public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      send_get_schema_with_environment_context(db_name, table_name, environment_context);
      return recv_get_schema_with_environment_context();
    }

    public void send_get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException
    {
      get_schema_with_environment_context_args args = new get_schema_with_environment_context_args();
      args.setDb_name(db_name);
      args.setTable_name(table_name);
      args.setEnvironment_context(environment_context);
      sendBase("get_schema_with_environment_context", args);
    }

    public List recv_get_schema_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException
    {
      get_schema_with_environment_context_result result = new get_schema_with_environment_context_result();
      receiveBase(result, "get_schema_with_environment_context");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result");
    }

    public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_create_table(tbl);
      recv_create_table();
    }

    public void send_create_table(Table tbl) throws org.apache.thrift.TException
    {
      create_table_args args = new create_table_args();
      args.setTbl(tbl);
      sendBase("create_table", args);
    }

    public void recv_create_table() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      create_table_result result = new create_table_result();
      receiveBase(result, "create_table");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      if (result.o4 != null) {
        throw result.o4;
      }
      return;
    }

    public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_create_table_with_environment_context(tbl, environment_context);
      recv_create_table_with_environment_context();
    }

    public void send_create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException
    {
      create_table_with_environment_context_args args = new create_table_with_environment_context_args();
      args.setTbl(tbl);
      args.setEnvironment_context(environment_context);
      sendBase("create_table_with_environment_context", args);
    }

    public void recv_create_table_with_environment_context() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      create_table_with_environment_context_result result = new create_table_with_environment_context_result();
      receiveBase(result, "create_table_with_environment_context");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      if (result.o4 != null) {
        throw result.o4;
      }
      return;
    }

    public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      send_drop_table(dbname, name, deleteData);
      recv_drop_table();
    }

    public void send_drop_table(String dbname, String name, boolean deleteData) throws org.apache.thrift.TException
    {
      drop_table_args args = new drop_table_args();
      args.setDbname(dbname);
      args.setName(name);
      args.setDeleteData(deleteData);
      sendBase("drop_table", args);
    }

    public void recv_drop_table() throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      drop_table_result result = new drop_table_result();
      receiveBase(result, "drop_table");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      return;
    }

    public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      send_drop_table_with_environment_context(dbname, name, deleteData, environment_context);
      recv_drop_table_with_environment_context();
    }

    public void send_drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException
    {
      drop_table_with_environment_context_args args = new drop_table_with_environment_context_args();
      args.setDbname(dbname);
      args.setName(name);
      args.setDeleteData(deleteData);
      args.setEnvironment_context(environment_context);
      sendBase("drop_table_with_environment_context", args);
    }

    public void recv_drop_table_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException
    {
      drop_table_with_environment_context_result result = new drop_table_with_environment_context_result();
      receiveBase(result, "drop_table_with_environment_context");
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o3 != null) {
        throw result.o3;
      }
      return;
    }

    public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException
    {
      send_get_tables(db_name, pattern);
      return recv_get_tables();
    }

    public void send_get_tables(String db_name, String pattern) throws org.apache.thrift.TException
    {
      get_tables_args args = new get_tables_args();
      args.setDb_name(db_name);
      args.setPattern(pattern);
      sendBase("get_tables", args);
    }

    public List recv_get_tables() throws MetaException, org.apache.thrift.TException
    {
      get_tables_result result = new get_tables_result();
      receiveBase(result, "get_tables");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables failed: unknown result");
    }

    public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException
    {
      send_get_all_tables(db_name);
      return recv_get_all_tables();
    }

    public void send_get_all_tables(String db_name) throws org.apache.thrift.TException
    {
      get_all_tables_args args = new get_all_tables_args();
      args.setDb_name(db_name);
      sendBase("get_all_tables", args);
    }

    public List recv_get_all_tables() throws MetaException, org.apache.thrift.TException
    {
      get_all_tables_result result = new get_all_tables_result();
      receiveBase(result, "get_all_tables");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result");
    }

    public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      send_get_table(dbname, tbl_name);
      return recv_get_table();
    }

    public void send_get_table(String dbname, String tbl_name) throws org.apache.thrift.TException
    {
      get_table_args args = new get_table_args();
      args.setDbname(dbname);
      args.setTbl_name(tbl_name);
      sendBase("get_table", args);
    }

    public Table recv_get_table() throws MetaException, NoSuchObjectException, org.apache.thrift.TException
    {
      get_table_result result = new get_table_result();
      receiveBase(result, "get_table");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.o1 != null) {
        throw result.o1;
      }
      if (result.o2 != null) {
        throw result.o2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table failed: unknown result");
    }

    public List
get_table_objects_by_name(String dbname, List tbl_names) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { send_get_table_objects_by_name(dbname, tbl_names); return recv_get_table_objects_by_name(); } public void send_get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException { get_table_objects_by_name_args args = new get_table_objects_by_name_args(); args.setDbname(dbname); args.setTbl_names(tbl_names); sendBase("get_table_objects_by_name", args); } public List
recv_get_table_objects_by_name() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); receiveBase(result, "get_table_objects_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { send_get_table_names_by_filter(dbname, filter, max_tables); return recv_get_table_names_by_filter(); } public void send_get_table_names_by_filter(String dbname, String filter, short max_tables) throws org.apache.thrift.TException { get_table_names_by_filter_args args = new get_table_names_by_filter_args(); args.setDbname(dbname); args.setFilter(filter); args.setMax_tables(max_tables); sendBase("get_table_names_by_filter", args); } public List recv_get_table_names_by_filter() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { get_table_names_by_filter_result result = new get_table_names_by_filter_result(); receiveBase(result, "get_table_names_by_filter"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); } public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_table(dbname, tbl_name, new_tbl); recv_alter_table(); } public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws org.apache.thrift.TException { alter_table_args args = new alter_table_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); sendBase("alter_table", args); } public void recv_alter_table() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_table_result result = new alter_table_result(); receiveBase(result, "alter_table"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); recv_alter_table_with_environment_context(); } public void send_alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException { alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); args.setEnvironment_context(environment_context); sendBase("alter_table_with_environment_context", args); } public void recv_alter_table_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); receiveBase(result, "alter_table_with_environment_context"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); recv_alter_table_with_cascade(); } public void send_alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws org.apache.thrift.TException { alter_table_with_cascade_args args = new alter_table_with_cascade_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); args.setCascade(cascade); sendBase("alter_table_with_cascade", args); } public void recv_alter_table_with_cascade() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_table_with_cascade_result result = new alter_table_with_cascade_result(); receiveBase(result, "alter_table_with_cascade"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_partition(new_part); return recv_add_partition(); } public void send_add_partition(Partition new_part) throws org.apache.thrift.TException { add_partition_args args = new add_partition_args(); args.setNew_part(new_part); sendBase("add_partition", args); } public Partition recv_add_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_partition_result result = new add_partition_result(); receiveBase(result, "add_partition"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); } public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_partition_with_environment_context(new_part, environment_context); return recv_add_partition_with_environment_context(); } public void send_add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException { add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); args.setNew_part(new_part); args.setEnvironment_context(environment_context); sendBase("add_partition_with_environment_context", args); } public Partition recv_add_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); receiveBase(result, "add_partition_with_environment_context"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); } public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_partitions(new_parts); return recv_add_partitions(); } public void send_add_partitions(List new_parts) throws org.apache.thrift.TException { add_partitions_args args = new add_partitions_args(); args.setNew_parts(new_parts); sendBase("add_partitions", args); } public int recv_add_partitions() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_partitions_result result = new add_partitions_result(); receiveBase(result, "add_partitions"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result"); } public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_partitions_pspec(new_parts); return recv_add_partitions_pspec(); } public void send_add_partitions_pspec(List new_parts) throws org.apache.thrift.TException { add_partitions_pspec_args args = new add_partitions_pspec_args(); args.setNew_parts(new_parts); sendBase("add_partitions_pspec", args); } public int recv_add_partitions_pspec() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_partitions_pspec_result result = new add_partitions_pspec_result(); receiveBase(result, "add_partitions_pspec"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result"); } public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_append_partition(db_name, tbl_name, part_vals); return recv_append_partition(); } public void send_append_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException { append_partition_args args = new append_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); sendBase("append_partition", args); } public Partition recv_append_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { append_partition_result result = new append_partition_result(); receiveBase(result, "append_partition"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); } public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_partitions_req(request); return recv_add_partitions_req(); } public void send_add_partitions_req(AddPartitionsRequest request) throws org.apache.thrift.TException { add_partitions_req_args args = new add_partitions_req_args(); args.setRequest(request); sendBase("add_partitions_req", args); } public AddPartitionsResult recv_add_partitions_req() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_partitions_req_result result = new add_partitions_req_result(); receiveBase(result, "add_partitions_req"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result"); } public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); return recv_append_partition_with_environment_context(); } public void send_append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws org.apache.thrift.TException { append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEnvironment_context(environment_context); sendBase("append_partition_with_environment_context", args); } public Partition recv_append_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); receiveBase(result, "append_partition_with_environment_context"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); } public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_append_partition_by_name(db_name, tbl_name, part_name); return recv_append_partition_by_name(); } public void send_append_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException { append_partition_by_name_args args = new append_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); sendBase("append_partition_by_name", args); } public Partition recv_append_partition_by_name() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { append_partition_by_name_result result = new append_partition_by_name_result(); receiveBase(result, "append_partition_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); } public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); return recv_append_partition_by_name_with_environment_context(); } public void send_append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws org.apache.thrift.TException { append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setEnvironment_context(environment_context); sendBase("append_partition_by_name_with_environment_context", args); } public Partition recv_append_partition_by_name_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); receiveBase(result, "append_partition_by_name_with_environment_context"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); } public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_partition(db_name, tbl_name, part_vals, deleteData); return recv_drop_partition(); } public void send_drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws org.apache.thrift.TException { drop_partition_args args = new drop_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setDeleteData(deleteData); sendBase("drop_partition", args); } public boolean recv_drop_partition() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_partition_result result = new drop_partition_result(); receiveBase(result, "drop_partition"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); } public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); return recv_drop_partition_with_environment_context(); } public void send_drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException { drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setDeleteData(deleteData); args.setEnvironment_context(environment_context); sendBase("drop_partition_with_environment_context", args); } public boolean recv_drop_partition_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); receiveBase(result, "drop_partition_with_environment_context"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); } public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); return recv_drop_partition_by_name(); } public void send_drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws org.apache.thrift.TException { drop_partition_by_name_args args = new drop_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setDeleteData(deleteData); sendBase("drop_partition_by_name", args); } public boolean recv_drop_partition_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_partition_by_name_result result = new drop_partition_by_name_result(); receiveBase(result, "drop_partition_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); } public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); return recv_drop_partition_by_name_with_environment_context(); } public void send_drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException { drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setDeleteData(deleteData); args.setEnvironment_context(environment_context); sendBase("drop_partition_by_name_with_environment_context", args); } public boolean recv_drop_partition_by_name_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); receiveBase(result, "drop_partition_by_name_with_environment_context"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); } public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_partitions_req(req); return recv_drop_partitions_req(); } public void send_drop_partitions_req(DropPartitionsRequest req) throws org.apache.thrift.TException { drop_partitions_req_args args = new drop_partitions_req_args(); args.setReq(req); sendBase("drop_partitions_req", args); } public DropPartitionsResult recv_drop_partitions_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_partitions_req_result result = new drop_partitions_req_result(); receiveBase(result, "drop_partitions_req"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result"); } public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partition(db_name, tbl_name, part_vals); return recv_get_partition(); } public void send_get_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException { get_partition_args args = new get_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); sendBase("get_partition", args); } public Partition recv_get_partition() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partition_result result = new get_partition_result(); receiveBase(result, "get_partition"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); } public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); return recv_exchange_partition(); } public void send_exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException { exchange_partition_args args = new exchange_partition_args(); args.setPartitionSpecs(partitionSpecs); args.setSource_db(source_db); args.setSource_table_name(source_table_name); args.setDest_db(dest_db); args.setDest_table_name(dest_table_name); sendBase("exchange_partition", args); } public Partition recv_exchange_partition() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { exchange_partition_result result = new exchange_partition_result(); receiveBase(result, "exchange_partition"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result"); } public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); return recv_get_partition_with_auth(); } public void send_get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws org.apache.thrift.TException { get_partition_with_auth_args args = new get_partition_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setUser_name(user_name); args.setGroup_names(group_names); sendBase("get_partition_with_auth", args); } public Partition recv_get_partition_with_auth() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partition_with_auth_result result = new get_partition_with_auth_result(); receiveBase(result, "get_partition_with_auth"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); } public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partition_by_name(db_name, tbl_name, part_name); return recv_get_partition_by_name(); } public void send_get_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException { get_partition_by_name_args args = new get_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); sendBase("get_partition_by_name", args); } public Partition recv_get_partition_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partition_by_name_result result = new get_partition_by_name_result(); receiveBase(result, "get_partition_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); } public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_partitions(db_name, tbl_name, max_parts); return recv_get_partitions(); } public void send_get_partitions(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException { get_partitions_args args = new get_partitions_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); sendBase("get_partitions", args); } public List recv_get_partitions() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_partitions_result result = new get_partitions_result(); receiveBase(result, "get_partitions"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); } public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); return recv_get_partitions_with_auth(); } public void send_get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException { get_partitions_with_auth_args args = new get_partitions_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); args.setUser_name(user_name); args.setGroup_names(group_names); sendBase("get_partitions_with_auth", args); } public List recv_get_partitions_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_partitions_with_auth_result result = new get_partitions_with_auth_result(); receiveBase(result, "get_partitions_with_auth"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_partitions_pspec(db_name, tbl_name, max_parts); return recv_get_partitions_pspec(); } public void send_get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws org.apache.thrift.TException { get_partitions_pspec_args args = new get_partitions_pspec_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); sendBase("get_partitions_pspec", args); } public List recv_get_partitions_pspec() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_partitions_pspec_result result = new get_partitions_pspec_result(); receiveBase(result, "get_partitions_pspec"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result"); } public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException { send_get_partition_names(db_name, tbl_name, max_parts); return recv_get_partition_names(); } public void send_get_partition_names(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException { get_partition_names_args args = new get_partition_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); sendBase("get_partition_names", args); } public List recv_get_partition_names() throws MetaException, org.apache.thrift.TException { get_partition_names_result result = new get_partition_names_result(); receiveBase(result, "get_partition_names"); if (result.isSetSuccess()) { return result.success; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); } public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); return recv_get_partitions_ps(); } public void send_get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException { get_partitions_ps_args args = new get_partitions_ps_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); sendBase("get_partitions_ps", args); } public List recv_get_partitions_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partitions_ps_result result = new get_partitions_ps_result(); receiveBase(result, "get_partitions_ps"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); } public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); return recv_get_partitions_ps_with_auth(); } public void send_get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException { get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); args.setUser_name(user_name); args.setGroup_names(group_names); sendBase("get_partitions_ps_with_auth", args); } public List recv_get_partitions_ps_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); receiveBase(result, "get_partitions_ps_with_auth"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); } public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); return recv_get_partition_names_ps(); } public void send_get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException { get_partition_names_ps_args args = new get_partition_names_ps_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); sendBase("get_partition_names_ps", args); } public List recv_get_partition_names_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partition_names_ps_result result = new get_partition_names_ps_result(); receiveBase(result, "get_partition_names_ps"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); } public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); return recv_get_partitions_by_filter(); } public void send_get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws org.apache.thrift.TException { get_partitions_by_filter_args args = new get_partitions_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); args.setMax_parts(max_parts); sendBase("get_partitions_by_filter", args); } public List recv_get_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partitions_by_filter_result result = new get_partitions_by_filter_result(); receiveBase(result, "get_partitions_by_filter"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); } public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); return recv_get_part_specs_by_filter(); } public void send_get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException { get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); args.setMax_parts(max_parts); sendBase("get_part_specs_by_filter", args); } public List recv_get_part_specs_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); receiveBase(result, "get_part_specs_by_filter"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); } public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partitions_by_expr(req); return recv_get_partitions_by_expr(); } public void send_get_partitions_by_expr(PartitionsByExprRequest req) throws org.apache.thrift.TException { get_partitions_by_expr_args args = new get_partitions_by_expr_args(); args.setReq(req); sendBase("get_partitions_by_expr", args); } public PartitionsByExprResult recv_get_partitions_by_expr() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partitions_by_expr_result result = new get_partitions_by_expr_result(); receiveBase(result, "get_partitions_by_expr"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); } public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_partitions_by_names(db_name, tbl_name, names); return recv_get_partitions_by_names(); } public void send_get_partitions_by_names(String db_name, String tbl_name, List names) throws org.apache.thrift.TException { get_partitions_by_names_args args = new get_partitions_by_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNames(names); sendBase("get_partitions_by_names", args); } public List recv_get_partitions_by_names() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_partitions_by_names_result result = new get_partitions_by_names_result(); receiveBase(result, "get_partitions_by_names"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result"); } public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_partition(db_name, tbl_name, new_part); recv_alter_partition(); } public void send_alter_partition(String db_name, String tbl_name, Partition new_part) throws org.apache.thrift.TException { alter_partition_args args = new alter_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_part(new_part); sendBase("alter_partition", args); } public void recv_alter_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_partition_result result = new alter_partition_result(); receiveBase(result, "alter_partition"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_partitions(db_name, tbl_name, new_parts); recv_alter_partitions(); } public void send_alter_partitions(String db_name, String tbl_name, List new_parts) throws org.apache.thrift.TException { alter_partitions_args args = new alter_partitions_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_parts(new_parts); sendBase("alter_partitions", args); } public void recv_alter_partitions() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_partitions_result result = new alter_partitions_result(); receiveBase(result, "alter_partitions"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); recv_alter_partition_with_environment_context(); } public void send_alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException { alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_part(new_part); args.setEnvironment_context(environment_context); sendBase("alter_partition_with_environment_context", args); } public void recv_alter_partition_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); receiveBase(result, "alter_partition_with_environment_context"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_rename_partition(db_name, tbl_name, part_vals, new_part); recv_rename_partition(); } public void send_rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws org.apache.thrift.TException { rename_partition_args args = new rename_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setNew_part(new_part); sendBase("rename_partition", args); } public void recv_rename_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException { rename_partition_result result = new rename_partition_result(); receiveBase(result, "rename_partition"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException { send_partition_name_has_valid_characters(part_vals, throw_exception); return recv_partition_name_has_valid_characters(); } public void send_partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws org.apache.thrift.TException { partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); args.setPart_vals(part_vals); args.setThrow_exception(throw_exception); sendBase("partition_name_has_valid_characters", args); } public boolean recv_partition_name_has_valid_characters() throws MetaException, org.apache.thrift.TException { partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); receiveBase(result, "partition_name_has_valid_characters"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); } public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException { send_get_config_value(name, defaultValue); return recv_get_config_value(); } public void send_get_config_value(String name, String defaultValue) throws org.apache.thrift.TException { get_config_value_args args = new get_config_value_args(); args.setName(name); args.setDefaultValue(defaultValue); sendBase("get_config_value", args); } public String recv_get_config_value() throws ConfigValSecurityException, org.apache.thrift.TException { get_config_value_result result = new get_config_value_result(); receiveBase(result, "get_config_value"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); } public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException { send_partition_name_to_vals(part_name); return recv_partition_name_to_vals(); } public void send_partition_name_to_vals(String part_name) throws org.apache.thrift.TException { partition_name_to_vals_args args = new partition_name_to_vals_args(); args.setPart_name(part_name); sendBase("partition_name_to_vals", args); } public List recv_partition_name_to_vals() throws MetaException, org.apache.thrift.TException { partition_name_to_vals_result result = new partition_name_to_vals_result(); receiveBase(result, "partition_name_to_vals"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); } public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException { send_partition_name_to_spec(part_name); return recv_partition_name_to_spec(); } public void send_partition_name_to_spec(String part_name) throws org.apache.thrift.TException { partition_name_to_spec_args args = new partition_name_to_spec_args(); args.setPart_name(part_name); sendBase("partition_name_to_spec", args); } public Map recv_partition_name_to_spec() throws MetaException, org.apache.thrift.TException { partition_name_to_spec_result result = new partition_name_to_spec_result(); receiveBase(result, "partition_name_to_spec"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); recv_markPartitionForEvent(); } public void send_markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException { markPartitionForEvent_args args = new markPartitionForEvent_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEventType(eventType); sendBase("markPartitionForEvent", args); } public void recv_markPartitionForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { markPartitionForEvent_result result = new markPartitionForEvent_result(); receiveBase(result, "markPartitionForEvent"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } if (result.o5 != null) { throw result.o5; } if (result.o6 != null) { throw result.o6; } return; } public boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); return recv_isPartitionMarkedForEvent(); } public void send_isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException { isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEventType(eventType); sendBase("isPartitionMarkedForEvent", args); } public boolean recv_isPartitionMarkedForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); receiveBase(result, "isPartitionMarkedForEvent"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } if (result.o5 != null) { throw result.o5; } if (result.o6 != null) { throw result.o6; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); } public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { send_add_index(new_index, index_table); return recv_add_index(); } public void send_add_index(Index new_index, Table index_table) throws org.apache.thrift.TException { add_index_args args = new add_index_args(); args.setNew_index(new_index); args.setIndex_table(index_table); sendBase("add_index", args); } public Index recv_add_index() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { add_index_result result = new add_index_result(); receiveBase(result, "add_index"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); } public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_index(dbname, base_tbl_name, idx_name, new_idx); recv_alter_index(); } public void send_alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws org.apache.thrift.TException { alter_index_args args = new alter_index_args(); args.setDbname(dbname); args.setBase_tbl_name(base_tbl_name); args.setIdx_name(idx_name); args.setNew_idx(new_idx); sendBase("alter_index", args); } public void recv_alter_index() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_index_result result = new alter_index_result(); receiveBase(result, "alter_index"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); return recv_drop_index_by_name(); } public void send_drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws org.apache.thrift.TException { drop_index_by_name_args args = new drop_index_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setIndex_name(index_name); args.setDeleteData(deleteData); sendBase("drop_index_by_name", args); } public boolean recv_drop_index_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_index_by_name_result result = new drop_index_by_name_result(); receiveBase(result, "drop_index_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); } public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_index_by_name(db_name, tbl_name, index_name); return recv_get_index_by_name(); } public void send_get_index_by_name(String db_name, String tbl_name, String index_name) throws org.apache.thrift.TException { get_index_by_name_args args = new get_index_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setIndex_name(index_name); sendBase("get_index_by_name", args); } public Index recv_get_index_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_index_by_name_result result = new get_index_by_name_result(); receiveBase(result, "get_index_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); } public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_indexes(db_name, tbl_name, max_indexes); return recv_get_indexes(); } public void send_get_indexes(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException { get_indexes_args args = new get_indexes_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_indexes(max_indexes); sendBase("get_indexes", args); } public List recv_get_indexes() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_indexes_result result = new get_indexes_result(); receiveBase(result, "get_indexes"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); } public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException { send_get_index_names(db_name, tbl_name, max_indexes); return recv_get_index_names(); } public void send_get_index_names(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException { get_index_names_args args = new get_index_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_indexes(max_indexes); sendBase("get_index_names", args); } public List recv_get_index_names() throws MetaException, org.apache.thrift.TException { get_index_names_result result = new get_index_names_result(); receiveBase(result, "get_index_names"); if (result.isSetSuccess()) { return result.success; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { send_update_table_column_statistics(stats_obj); return recv_update_table_column_statistics(); } public void send_update_table_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException { update_table_column_statistics_args args = new update_table_column_statistics_args(); args.setStats_obj(stats_obj); sendBase("update_table_column_statistics", args); } public boolean recv_update_table_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { update_table_column_statistics_result result = new update_table_column_statistics_result(); receiveBase(result, "update_table_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result"); } public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { send_update_partition_column_statistics(stats_obj); return recv_update_partition_column_statistics(); } public void send_update_partition_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException { update_partition_column_statistics_args args = new update_partition_column_statistics_args(); args.setStats_obj(stats_obj); sendBase("update_partition_column_statistics", args); } public boolean recv_update_partition_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { update_partition_column_statistics_result result = new update_partition_column_statistics_result(); receiveBase(result, "update_partition_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); } public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { send_get_table_column_statistics(db_name, tbl_name, col_name); return recv_get_table_column_statistics(); } public void send_get_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException { get_table_column_statistics_args args = new get_table_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setCol_name(col_name); sendBase("get_table_column_statistics", args); } public ColumnStatistics recv_get_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { get_table_column_statistics_result result = new get_table_column_statistics_result(); receiveBase(result, "get_table_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result"); } public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); return recv_get_partition_column_statistics(); } public void send_get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException { get_partition_column_statistics_args args = new get_partition_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setCol_name(col_name); sendBase("get_partition_column_statistics", args); } public ColumnStatistics recv_get_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { get_partition_column_statistics_result result = new get_partition_column_statistics_result(); receiveBase(result, "get_partition_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); } public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_table_statistics_req(request); return recv_get_table_statistics_req(); } public void send_get_table_statistics_req(TableStatsRequest request) throws org.apache.thrift.TException { get_table_statistics_req_args args = new get_table_statistics_req_args(); args.setRequest(request); sendBase("get_table_statistics_req", args); } public TableStatsResult recv_get_table_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_table_statistics_req_result result = new get_table_statistics_req_result(); receiveBase(result, "get_table_statistics_req"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result"); } public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_partitions_statistics_req(request); return recv_get_partitions_statistics_req(); } public void send_get_partitions_statistics_req(PartitionsStatsRequest request) throws org.apache.thrift.TException { get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); args.setRequest(request); sendBase("get_partitions_statistics_req", args); } public PartitionsStatsResult recv_get_partitions_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); receiveBase(result, "get_partitions_statistics_req"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); } public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_get_aggr_stats_for(request); return recv_get_aggr_stats_for(); } public void send_get_aggr_stats_for(PartitionsStatsRequest request) throws org.apache.thrift.TException { get_aggr_stats_for_args args = new get_aggr_stats_for_args(); args.setRequest(request); sendBase("get_aggr_stats_for", args); } public AggrStats recv_get_aggr_stats_for() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { get_aggr_stats_for_result result = new get_aggr_stats_for_result(); receiveBase(result, "get_aggr_stats_for"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); } public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { send_set_aggr_stats_for(request); return recv_set_aggr_stats_for(); } public void send_set_aggr_stats_for(SetPartitionsStatsRequest request) throws org.apache.thrift.TException { set_aggr_stats_for_args args = new set_aggr_stats_for_args(); args.setRequest(request); sendBase("set_aggr_stats_for", args); } public boolean recv_set_aggr_stats_for() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { set_aggr_stats_for_result result = new set_aggr_stats_for_result(); receiveBase(result, "set_aggr_stats_for"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); } public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); return recv_delete_partition_column_statistics(); } public void send_delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException { delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setCol_name(col_name); sendBase("delete_partition_column_statistics", args); } public boolean recv_delete_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); receiveBase(result, "delete_partition_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); } public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { send_delete_table_column_statistics(db_name, tbl_name, col_name); return recv_delete_table_column_statistics(); } public void send_delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException { delete_table_column_statistics_args args = new delete_table_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setCol_name(col_name); sendBase("delete_table_column_statistics", args); } public boolean recv_delete_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { delete_table_column_statistics_result result = new delete_table_column_statistics_result(); receiveBase(result, "delete_table_column_statistics"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); } public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { send_create_function(func); recv_create_function(); } public void send_create_function(Function func) throws org.apache.thrift.TException { create_function_args args = new create_function_args(); args.setFunc(func); sendBase("create_function", args); } public void recv_create_function() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { create_function_result result = new create_function_result(); receiveBase(result, "create_function"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } if (result.o4 != null) { throw result.o4; } return; } public void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_function(dbName, funcName); recv_drop_function(); } public void send_drop_function(String dbName, String funcName) throws org.apache.thrift.TException { drop_function_args args = new drop_function_args(); args.setDbName(dbName); args.setFuncName(funcName); sendBase("drop_function", args); } public void recv_drop_function() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_function_result result = new drop_function_result(); receiveBase(result, "drop_function"); if (result.o1 != null) { throw result.o1; } if (result.o3 != null) { throw result.o3; } return; } public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_function(dbName, funcName, newFunc); recv_alter_function(); } public void send_alter_function(String dbName, String funcName, Function newFunc) throws org.apache.thrift.TException { alter_function_args args = new alter_function_args(); args.setDbName(dbName); args.setFuncName(funcName); args.setNewFunc(newFunc); sendBase("alter_function", args); } public void recv_alter_function() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_function_result result = new alter_function_result(); receiveBase(result, "alter_function"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException { send_get_functions(dbName, pattern); return recv_get_functions(); } public void send_get_functions(String dbName, String pattern) throws org.apache.thrift.TException { get_functions_args args = new get_functions_args(); args.setDbName(dbName); args.setPattern(pattern); sendBase("get_functions", args); } public List recv_get_functions() throws MetaException, org.apache.thrift.TException { get_functions_result result = new get_functions_result(); receiveBase(result, "get_functions"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_functions failed: unknown result"); } public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_function(dbName, funcName); return recv_get_function(); } public void send_get_function(String dbName, String funcName) throws org.apache.thrift.TException { get_function_args args = new get_function_args(); args.setDbName(dbName); args.setFuncName(funcName); sendBase("get_function", args); } public Function recv_get_function() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_function_result result = new get_function_result(); receiveBase(result, "get_function"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function failed: unknown result"); } public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException { send_create_role(role); return recv_create_role(); } public void send_create_role(Role role) throws org.apache.thrift.TException { create_role_args args = new create_role_args(); args.setRole(role); sendBase("create_role", args); } public boolean recv_create_role() throws MetaException, org.apache.thrift.TException { create_role_result result = new create_role_result(); receiveBase(result, "create_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_role failed: unknown result"); } public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException { send_drop_role(role_name); return recv_drop_role(); } public void send_drop_role(String role_name) throws org.apache.thrift.TException { drop_role_args args = new drop_role_args(); args.setRole_name(role_name); sendBase("drop_role", args); } public boolean recv_drop_role() throws MetaException, org.apache.thrift.TException { drop_role_result result = new drop_role_result(); receiveBase(result, "drop_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); } public List get_role_names() throws MetaException, org.apache.thrift.TException { send_get_role_names(); return recv_get_role_names(); } public void send_get_role_names() throws org.apache.thrift.TException { get_role_names_args args = new get_role_names_args(); sendBase("get_role_names", args); } public List recv_get_role_names() throws MetaException, org.apache.thrift.TException { get_role_names_result result = new get_role_names_result(); receiveBase(result, "get_role_names"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result"); } public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException { send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); return recv_grant_role(); } public void send_grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws org.apache.thrift.TException { grant_role_args args = new grant_role_args(); args.setRole_name(role_name); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.setGrantor(grantor); args.setGrantorType(grantorType); args.setGrant_option(grant_option); sendBase("grant_role", args); } public boolean recv_grant_role() throws MetaException, org.apache.thrift.TException { grant_role_result result = new grant_role_result(); receiveBase(result, "grant_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_role failed: unknown result"); } public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException { send_revoke_role(role_name, principal_name, principal_type); return recv_revoke_role(); } public void send_revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException { revoke_role_args args = new revoke_role_args(); args.setRole_name(role_name); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); sendBase("revoke_role", args); } public boolean recv_revoke_role() throws MetaException, org.apache.thrift.TException { revoke_role_result result = new revoke_role_result(); receiveBase(result, "revoke_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result"); } public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException { send_list_roles(principal_name, principal_type); return recv_list_roles(); } public void send_list_roles(String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException { list_roles_args args = new list_roles_args(); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); sendBase("list_roles", args); } public List recv_list_roles() throws MetaException, org.apache.thrift.TException { list_roles_result result = new list_roles_result(); receiveBase(result, "list_roles"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_roles failed: unknown result"); } public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException { send_grant_revoke_role(request); return recv_grant_revoke_role(); } public void send_grant_revoke_role(GrantRevokeRoleRequest request) throws org.apache.thrift.TException { grant_revoke_role_args args = new grant_revoke_role_args(); args.setRequest(request); sendBase("grant_revoke_role", args); } public GrantRevokeRoleResponse recv_grant_revoke_role() throws MetaException, org.apache.thrift.TException { grant_revoke_role_result result = new grant_revoke_role_result(); receiveBase(result, "grant_revoke_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result"); } public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException { send_get_principals_in_role(request); return recv_get_principals_in_role(); } public void send_get_principals_in_role(GetPrincipalsInRoleRequest request) throws org.apache.thrift.TException { get_principals_in_role_args args = new get_principals_in_role_args(); args.setRequest(request); sendBase("get_principals_in_role", args); } public GetPrincipalsInRoleResponse recv_get_principals_in_role() throws MetaException, org.apache.thrift.TException { get_principals_in_role_result result = new get_principals_in_role_result(); receiveBase(result, "get_principals_in_role"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result"); } public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException { send_get_role_grants_for_principal(request); return recv_get_role_grants_for_principal(); } public void send_get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws org.apache.thrift.TException { get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); args.setRequest(request); sendBase("get_role_grants_for_principal", args); } public GetRoleGrantsForPrincipalResponse recv_get_role_grants_for_principal() throws MetaException, org.apache.thrift.TException { get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); receiveBase(result, "get_role_grants_for_principal"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); } public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException { send_get_privilege_set(hiveObject, user_name, group_names); return recv_get_privilege_set(); } public void send_get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws org.apache.thrift.TException { get_privilege_set_args args = new get_privilege_set_args(); args.setHiveObject(hiveObject); args.setUser_name(user_name); args.setGroup_names(group_names); sendBase("get_privilege_set", args); } public PrincipalPrivilegeSet recv_get_privilege_set() throws MetaException, org.apache.thrift.TException { get_privilege_set_result result = new get_privilege_set_result(); receiveBase(result, "get_privilege_set"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result"); } public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException { send_list_privileges(principal_name, principal_type, hiveObject); return recv_list_privileges(); } public void send_list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws org.apache.thrift.TException { list_privileges_args args = new list_privileges_args(); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.setHiveObject(hiveObject); sendBase("list_privileges", args); } public List recv_list_privileges() throws MetaException, org.apache.thrift.TException { list_privileges_result result = new list_privileges_result(); receiveBase(result, "list_privileges"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result"); } public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException { send_grant_privileges(privileges); return recv_grant_privileges(); } public void send_grant_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException { grant_privileges_args args = new grant_privileges_args(); args.setPrivileges(privileges); sendBase("grant_privileges", args); } public boolean recv_grant_privileges() throws MetaException, org.apache.thrift.TException { grant_privileges_result result = new grant_privileges_result(); receiveBase(result, "grant_privileges"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); } public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException { send_revoke_privileges(privileges); return recv_revoke_privileges(); } public void send_revoke_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException { revoke_privileges_args args = new revoke_privileges_args(); args.setPrivileges(privileges); sendBase("revoke_privileges", args); } public boolean recv_revoke_privileges() throws MetaException, org.apache.thrift.TException { revoke_privileges_result result = new revoke_privileges_result(); receiveBase(result, "revoke_privileges"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); } public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException { send_grant_revoke_privileges(request); return recv_grant_revoke_privileges(); } public void send_grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws org.apache.thrift.TException { grant_revoke_privileges_args args = new grant_revoke_privileges_args(); args.setRequest(request); sendBase("grant_revoke_privileges", args); } public GrantRevokePrivilegeResponse recv_grant_revoke_privileges() throws MetaException, org.apache.thrift.TException { grant_revoke_privileges_result result = new grant_revoke_privileges_result(); receiveBase(result, "grant_revoke_privileges"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); } public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException { send_set_ugi(user_name, group_names); return recv_set_ugi(); } public void send_set_ugi(String user_name, List group_names) throws org.apache.thrift.TException { set_ugi_args args = new set_ugi_args(); args.setUser_name(user_name); args.setGroup_names(group_names); sendBase("set_ugi", args); } public List recv_set_ugi() throws MetaException, org.apache.thrift.TException { set_ugi_result result = new set_ugi_result(); receiveBase(result, "set_ugi"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result"); } public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException { send_get_delegation_token(token_owner, renewer_kerberos_principal_name); return recv_get_delegation_token(); } public void send_get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws org.apache.thrift.TException { get_delegation_token_args args = new get_delegation_token_args(); args.setToken_owner(token_owner); args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); sendBase("get_delegation_token", args); } public String recv_get_delegation_token() throws MetaException, org.apache.thrift.TException { get_delegation_token_result result = new get_delegation_token_result(); receiveBase(result, "get_delegation_token"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result"); } public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException { send_renew_delegation_token(token_str_form); return recv_renew_delegation_token(); } public void send_renew_delegation_token(String token_str_form) throws org.apache.thrift.TException { renew_delegation_token_args args = new renew_delegation_token_args(); args.setToken_str_form(token_str_form); sendBase("renew_delegation_token", args); } public long recv_renew_delegation_token() throws MetaException, org.apache.thrift.TException { renew_delegation_token_result result = new renew_delegation_token_result(); receiveBase(result, "renew_delegation_token"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result"); } public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException { send_cancel_delegation_token(token_str_form); recv_cancel_delegation_token(); } public void send_cancel_delegation_token(String token_str_form) throws org.apache.thrift.TException { cancel_delegation_token_args args = new cancel_delegation_token_args(); args.setToken_str_form(token_str_form); sendBase("cancel_delegation_token", args); } public void recv_cancel_delegation_token() throws MetaException, org.apache.thrift.TException { cancel_delegation_token_result result = new cancel_delegation_token_result(); receiveBase(result, "cancel_delegation_token"); if (result.o1 != null) { throw result.o1; } return; } public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException { send_get_open_txns(); return recv_get_open_txns(); } public void send_get_open_txns() throws org.apache.thrift.TException { get_open_txns_args args = new get_open_txns_args(); sendBase("get_open_txns", args); } public GetOpenTxnsResponse recv_get_open_txns() throws org.apache.thrift.TException { get_open_txns_result result = new get_open_txns_result(); receiveBase(result, "get_open_txns"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result"); } public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException { send_get_open_txns_info(); return recv_get_open_txns_info(); } public void send_get_open_txns_info() throws org.apache.thrift.TException { get_open_txns_info_args args = new get_open_txns_info_args(); sendBase("get_open_txns_info", args); } public GetOpenTxnsInfoResponse recv_get_open_txns_info() throws org.apache.thrift.TException { get_open_txns_info_result result = new get_open_txns_info_result(); receiveBase(result, "get_open_txns_info"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result"); } public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException { send_open_txns(rqst); return recv_open_txns(); } public void send_open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException { open_txns_args args = new open_txns_args(); args.setRqst(rqst); sendBase("open_txns", args); } public OpenTxnsResponse recv_open_txns() throws org.apache.thrift.TException { open_txns_result result = new open_txns_result(); receiveBase(result, "open_txns"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "open_txns failed: unknown result"); } public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException { send_abort_txn(rqst); recv_abort_txn(); } public void send_abort_txn(AbortTxnRequest rqst) throws org.apache.thrift.TException { abort_txn_args args = new abort_txn_args(); args.setRqst(rqst); sendBase("abort_txn", args); } public void recv_abort_txn() throws NoSuchTxnException, org.apache.thrift.TException { abort_txn_result result = new abort_txn_result(); receiveBase(result, "abort_txn"); if (result.o1 != null) { throw result.o1; } return; } public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { send_commit_txn(rqst); recv_commit_txn(); } public void send_commit_txn(CommitTxnRequest rqst) throws org.apache.thrift.TException { commit_txn_args args = new commit_txn_args(); args.setRqst(rqst); sendBase("commit_txn", args); } public void recv_commit_txn() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { commit_txn_result result = new commit_txn_result(); receiveBase(result, "commit_txn"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { send_lock(rqst); return recv_lock(); } public void send_lock(LockRequest rqst) throws org.apache.thrift.TException { lock_args args = new lock_args(); args.setRqst(rqst); sendBase("lock", args); } public LockResponse recv_lock() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { lock_result result = new lock_result(); receiveBase(result, "lock"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "lock failed: unknown result"); } public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException { send_check_lock(rqst); return recv_check_lock(); } public void send_check_lock(CheckLockRequest rqst) throws org.apache.thrift.TException { check_lock_args args = new check_lock_args(); args.setRqst(rqst); sendBase("check_lock", args); } public LockResponse recv_check_lock() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException { check_lock_result result = new check_lock_result(); receiveBase(result, "check_lock"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "check_lock failed: unknown result"); } public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException { send_unlock(rqst); recv_unlock(); } public void send_unlock(UnlockRequest rqst) throws org.apache.thrift.TException { unlock_args args = new unlock_args(); args.setRqst(rqst); sendBase("unlock", args); } public void recv_unlock() throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException { unlock_result result = new unlock_result(); receiveBase(result, "unlock"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException { send_show_locks(rqst); return recv_show_locks(); } public void send_show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException { show_locks_args args = new show_locks_args(); args.setRqst(rqst); sendBase("show_locks", args); } public ShowLocksResponse recv_show_locks() throws org.apache.thrift.TException { show_locks_result result = new show_locks_result(); receiveBase(result, "show_locks"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_locks failed: unknown result"); } public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { send_heartbeat(ids); recv_heartbeat(); } public void send_heartbeat(HeartbeatRequest ids) throws org.apache.thrift.TException { heartbeat_args args = new heartbeat_args(); args.setIds(ids); sendBase("heartbeat", args); } public void recv_heartbeat() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { heartbeat_result result = new heartbeat_result(); receiveBase(result, "heartbeat"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } return; } public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException { send_heartbeat_txn_range(txns); return recv_heartbeat_txn_range(); } public void send_heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException { heartbeat_txn_range_args args = new heartbeat_txn_range_args(); args.setTxns(txns); sendBase("heartbeat_txn_range", args); } public HeartbeatTxnRangeResponse recv_heartbeat_txn_range() throws org.apache.thrift.TException { heartbeat_txn_range_result result = new heartbeat_txn_range_result(); receiveBase(result, "heartbeat_txn_range"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); } public void compact(CompactionRequest rqst) throws org.apache.thrift.TException { send_compact(rqst); recv_compact(); } public void send_compact(CompactionRequest rqst) throws org.apache.thrift.TException { compact_args args = new compact_args(); args.setRqst(rqst); sendBase("compact", args); } public void recv_compact() throws org.apache.thrift.TException { compact_result result = new compact_result(); receiveBase(result, "compact"); return; } public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException { send_show_compact(rqst); return recv_show_compact(); } public void send_show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException { show_compact_args args = new show_compact_args(); args.setRqst(rqst); sendBase("show_compact", args); } public ShowCompactResponse recv_show_compact() throws org.apache.thrift.TException { show_compact_result result = new show_compact_result(); receiveBase(result, "show_compact"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_compact failed: unknown result"); } public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { send_add_dynamic_partitions(rqst); recv_add_dynamic_partitions(); } public void send_add_dynamic_partitions(AddDynamicPartitions rqst) throws org.apache.thrift.TException { add_dynamic_partitions_args args = new add_dynamic_partitions_args(); args.setRqst(rqst); sendBase("add_dynamic_partitions", args); } public void recv_add_dynamic_partitions() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { add_dynamic_partitions_result result = new add_dynamic_partitions_result(); receiveBase(result, "add_dynamic_partitions"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException { send_get_next_notification(rqst); return recv_get_next_notification(); } public void send_get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException { get_next_notification_args args = new get_next_notification_args(); args.setRqst(rqst); sendBase("get_next_notification", args); } public NotificationEventResponse recv_get_next_notification() throws org.apache.thrift.TException { get_next_notification_result result = new get_next_notification_result(); receiveBase(result, "get_next_notification"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result"); } public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException { send_get_current_notificationEventId(); return recv_get_current_notificationEventId(); } public void send_get_current_notificationEventId() throws org.apache.thrift.TException { get_current_notificationEventId_args args = new get_current_notificationEventId_args(); sendBase("get_current_notificationEventId", args); } public CurrentNotificationEventId recv_get_current_notificationEventId() throws org.apache.thrift.TException { get_current_notificationEventId_result result = new get_current_notificationEventId_result(); receiveBase(result, "get_current_notificationEventId"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); } public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException { send_fire_listener_event(rqst); return recv_fire_listener_event(); } public void send_fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException { fire_listener_event_args args = new fire_listener_event_args(); args.setRqst(rqst); sendBase("fire_listener_event", args); } public FireEventResponse recv_fire_listener_event() throws org.apache.thrift.TException { fire_listener_event_result result = new fire_listener_event_result(); receiveBase(result, "fire_listener_event"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result"); } } public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getMetaConf_call method_call = new getMetaConf_call(key, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; public getMetaConf_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.key = key; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); getMetaConf_args args = new getMetaConf_args(); args.setKey(key); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws MetaException, 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_getMetaConf(); } } public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setMetaConf_call method_call = new setMetaConf_call(key, value, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; private String value; public setMetaConf_call(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.key = key; this.value = value; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); setMetaConf_args args = new setMetaConf_args(); args.setKey(key); args.setValue(value); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws MetaException, 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_setMetaConf(); } } public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_database_call method_call = new create_database_call(database, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_database_call extends org.apache.thrift.async.TAsyncMethodCall { private Database database; public create_database_call(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.database = database; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_database_args args = new create_database_args(); args.setDatabase(database); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, 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_create_database(); } } public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_database_call method_call = new get_database_call(name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_database_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; public get_database_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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("get_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_database_args args = new get_database_args(); args.setName(name); args.write(prot); prot.writeMessageEnd(); } public Database getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_database(); } } public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_database_call method_call = new drop_database_call(name, deleteData, cascade, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_database_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; private boolean deleteData; private boolean cascade; public drop_database_call(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.deleteData = deleteData; this.cascade = cascade; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_database_args args = new drop_database_args(); args.setName(name); args.setDeleteData(deleteData); args.setCascade(cascade); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, 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_drop_database(); } } public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_databases_call extends org.apache.thrift.async.TAsyncMethodCall { private String pattern; public get_databases_call(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.pattern = pattern; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_databases_args args = new get_databases_args(); args.setPattern(pattern); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_databases(); } } public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_databases_call extends org.apache.thrift.async.TAsyncMethodCall { public get_all_databases_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_databases_args args = new get_all_databases_args(); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_databases(); } } public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_database_call method_call = new alter_database_call(dbname, db, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_database_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private Database db; public alter_database_call(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.db = db; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_database_args args = new alter_database_args(); args.setDbname(dbname); args.setDb(db); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws MetaException, NoSuchObjectException, 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_alter_database(); } } public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_type_call method_call = new get_type_call(name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_type_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; public get_type_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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("get_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_type_args args = new get_type_args(); args.setName(name); args.write(prot); prot.writeMessageEnd(); } public Type getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_type(); } } public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_type_call method_call = new create_type_call(type, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_type_call extends org.apache.thrift.async.TAsyncMethodCall { private Type type; public create_type_call(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.type = type; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_type_args args = new create_type_args(); args.setType(type); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, 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_create_type(); } } public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_type_call method_call = new drop_type_call(type, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_type_call extends org.apache.thrift.async.TAsyncMethodCall { private String type; public drop_type_call(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.type = type; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_type_args args = new drop_type_args(); args.setType(type); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, NoSuchObjectException, 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_drop_type(); } } public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_type_all_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; public get_type_all_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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("get_type_all", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_type_all_args args = new get_type_all_args(); args.setName(name); args.write(prot); prot.writeMessageEnd(); } public Map getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_type_all(); } } public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_fields_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String table_name; public get_fields_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.table_name = table_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_fields_args args = new get_fields_args(); args.setDb_name(db_name); args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_fields(); } } public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_fields_with_environment_context_call method_call = new get_fields_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_fields_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String table_name; private EnvironmentContext environment_context; public get_fields_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.table_name = table_name; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_fields_with_environment_context_args args = new get_fields_with_environment_context_args(); args.setDb_name(db_name); args.setTable_name(table_name); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_fields_with_environment_context(); } } public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_schema_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String table_name; public get_schema_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.table_name = table_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_schema_args args = new get_schema_args(); args.setDb_name(db_name); args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_schema(); } } public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_schema_with_environment_context_call method_call = new get_schema_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_schema_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String table_name; private EnvironmentContext environment_context; public get_schema_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.table_name = table_name; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_schema_with_environment_context_args args = new get_schema_with_environment_context_args(); args.setDb_name(db_name); args.setTable_name(table_name); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_schema_with_environment_context(); } } public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_table_call method_call = new create_table_call(tbl, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_table_call extends org.apache.thrift.async.TAsyncMethodCall { private Table tbl; public create_table_call(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tbl = tbl; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_table_args args = new create_table_args(); args.setTbl(tbl); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, 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_create_table(); } } public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_table_with_environment_context_call method_call = new create_table_with_environment_context_call(tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private Table tbl; private EnvironmentContext environment_context; public create_table_with_environment_context_call(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tbl = tbl; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_table_with_environment_context_args args = new create_table_with_environment_context_args(); args.setTbl(tbl); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, 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_create_table_with_environment_context(); } } public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_table_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String name; private boolean deleteData; public drop_table_call(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.name = name; this.deleteData = deleteData; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_table_args args = new drop_table_args(); args.setDbname(dbname); args.setName(name); args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchObjectException, MetaException, 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_drop_table(); } } public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_table_with_environment_context_call method_call = new drop_table_with_environment_context_call(dbname, name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String name; private boolean deleteData; private EnvironmentContext environment_context; public drop_table_with_environment_context_call(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.name = name; this.deleteData = deleteData; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_table_with_environment_context_args args = new drop_table_with_environment_context_args(); args.setDbname(dbname); args.setName(name); args.setDeleteData(deleteData); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchObjectException, MetaException, 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_drop_table_with_environment_context(); } } public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_tables_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String pattern; public get_tables_call(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.pattern = pattern; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_tables_args args = new get_tables_args(); args.setDb_name(db_name); args.setPattern(pattern); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_tables(); } } public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_tables_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; public get_all_tables_call(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_tables_args args = new get_all_tables_args(); args.setDb_name(db_name); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_tables(); } } public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String tbl_name; public get_table_call(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.tbl_name = tbl_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_args args = new get_table_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.write(prot); prot.writeMessageEnd(); } public Table getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table(); } } public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_objects_by_name_call method_call = new get_table_objects_by_name_call(dbname, tbl_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_objects_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private List tbl_names; public get_table_objects_by_name_call(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.tbl_names = tbl_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_objects_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_objects_by_name_args args = new get_table_objects_by_name_args(); args.setDbname(dbname); args.setTbl_names(tbl_names); args.write(prot); prot.writeMessageEnd(); } public List
getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_objects_by_name(); } } public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_names_by_filter_call method_call = new get_table_names_by_filter_call(dbname, filter, max_tables, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_names_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String filter; private short max_tables; public get_table_names_by_filter_call(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.filter = filter; this.max_tables = max_tables; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_names_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_names_by_filter_args args = new get_table_names_by_filter_args(); args.setDbname(dbname); args.setFilter(filter); args.setMax_tables(max_tables); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_names_by_filter(); } } public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_table_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String tbl_name; private Table new_tbl; public alter_table_call(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_table_args args = new alter_table_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_table(); } } public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_table_with_environment_context_call method_call = new alter_table_with_environment_context_call(dbname, tbl_name, new_tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String tbl_name; private Table new_tbl; private EnvironmentContext environment_context; public alter_table_with_environment_context_call(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_table_with_environment_context(); } } public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_table_with_cascade_call method_call = new alter_table_with_cascade_call(dbname, tbl_name, new_tbl, cascade, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_table_with_cascade_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String tbl_name; private Table new_tbl; private boolean cascade; public alter_table_with_cascade_call(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; this.cascade = cascade; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_cascade", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_table_with_cascade_args args = new alter_table_with_cascade_args(); args.setDbname(dbname); args.setTbl_name(tbl_name); args.setNew_tbl(new_tbl); args.setCascade(cascade); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_table_with_cascade(); } } public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private Partition new_part; public add_partition_call(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.new_part = new_part; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_partition_args args = new add_partition_args(); args.setNew_part(new_part); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_partition(); } } public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_partition_with_environment_context_call method_call = new add_partition_with_environment_context_call(new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private Partition new_part; private EnvironmentContext environment_context; public add_partition_with_environment_context_call(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.new_part = new_part; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); args.setNew_part(new_part); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_partition_with_environment_context(); } } public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_partitions_call method_call = new add_partitions_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { private List new_parts; public add_partitions_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.new_parts = new_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_partitions_args args = new add_partitions_args(); args.setNew_parts(new_parts); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_partitions(); } } public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_partitions_pspec_call method_call = new add_partitions_pspec_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { private List new_parts; public add_partitions_pspec_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.new_parts = new_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_partitions_pspec_args args = new add_partitions_pspec_args(); args.setNew_parts(new_parts); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_partitions_pspec(); } } public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class append_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; public append_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); append_partition_args args = new append_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, 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_append_partition(); } } public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_partitions_req_call method_call = new add_partitions_req_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { private AddPartitionsRequest request; public add_partitions_req_call(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_partitions_req_args args = new add_partitions_req_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public AddPartitionsResult getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_partitions_req(); } } public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); append_partition_with_environment_context_call method_call = new append_partition_with_environment_context_call(db_name, tbl_name, part_vals, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class append_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private EnvironmentContext environment_context; public append_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, 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_append_partition_with_environment_context(); } } public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class append_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; public append_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); append_partition_by_name_args args = new append_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, 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_append_partition_by_name(); } } public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); append_partition_by_name_with_environment_context_call method_call = new append_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class append_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; private EnvironmentContext environment_context; public append_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, 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_append_partition_by_name_with_environment_context(); } } public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private boolean deleteData; public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.deleteData = deleteData; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_partition_args args = new drop_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, 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_drop_partition(); } } public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_partition_with_environment_context_call method_call = new drop_partition_with_environment_context_call(db_name, tbl_name, part_vals, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private boolean deleteData; private EnvironmentContext environment_context; public drop_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.deleteData = deleteData; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setDeleteData(deleteData); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, 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_drop_partition_with_environment_context(); } } public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; private boolean deleteData; public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.deleteData = deleteData; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_partition_by_name_args args = new drop_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, 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_drop_partition_by_name(); } } public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_partition_by_name_with_environment_context_call method_call = new drop_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; private boolean deleteData; private EnvironmentContext environment_context; public drop_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.deleteData = deleteData; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setDeleteData(deleteData); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, 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_drop_partition_by_name_with_environment_context(); } } public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_partitions_req_call method_call = new drop_partitions_req_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { private DropPartitionsRequest req; public drop_partitions_req_call(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_partitions_req_args args = new drop_partitions_req_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public DropPartitionsResult getResult() throws NoSuchObjectException, MetaException, 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_drop_partitions_req(); } } public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; public get_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_args args = new get_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition(); } } public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); exchange_partition_call method_call = new exchange_partition_call(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class exchange_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private Map partitionSpecs; private String source_db; private String source_table_name; private String dest_db; private String dest_table_name; public exchange_partition_call(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.partitionSpecs = partitionSpecs; this.source_db = source_db; this.source_table_name = source_table_name; this.dest_db = dest_db; this.dest_table_name = dest_table_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exchange_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); exchange_partition_args args = new exchange_partition_args(); args.setPartitionSpecs(partitionSpecs); args.setSource_db(source_db); args.setSource_table_name(source_table_name); args.setDest_db(dest_db); args.setDest_table_name(dest_table_name); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, 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_exchange_partition(); } } public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_with_auth_call method_call = new get_partition_with_auth_call(db_name, tbl_name, part_vals, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private String user_name; private List group_names; public get_partition_with_auth_call(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.user_name = user_name; this.group_names = group_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_with_auth_args args = new get_partition_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setUser_name(user_name); args.setGroup_names(group_names); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition_with_auth(); } } public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; public get_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_by_name_args args = new get_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.write(prot); prot.writeMessageEnd(); } public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition_by_name(); } } public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private short max_parts; public get_partitions_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_args args = new get_partitions_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions(); } } public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_with_auth_call method_call = new get_partitions_with_auth_call(db_name, tbl_name, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private short max_parts; private String user_name; private List group_names; public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; this.user_name = user_name; this.group_names = group_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_with_auth_args args = new get_partitions_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); args.setUser_name(user_name); args.setGroup_names(group_names); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_with_auth(); } } public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_pspec_call method_call = new get_partitions_pspec_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private int max_parts; public get_partitions_pspec_call(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_pspec_args args = new get_partitions_pspec_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_pspec(); } } public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_names_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private short max_parts; public get_partition_names_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_names_args args = new get_partition_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition_names(); } } public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_ps_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private short max_parts; public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_ps_args args = new get_partitions_ps_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_ps(); } } public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_ps_with_auth_call method_call = new get_partitions_ps_with_auth_call(db_name, tbl_name, part_vals, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_ps_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private short max_parts; private String user_name; private List group_names; public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; this.user_name = user_name; this.group_names = group_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); args.setUser_name(user_name); args.setGroup_names(group_names); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_ps_with_auth(); } } public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_names_ps_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private short max_parts; public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_names_ps_args args = new get_partition_names_ps_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition_names_ps(); } } public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String filter; private short max_parts; public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.filter = filter; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_by_filter_args args = new get_partitions_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_by_filter(); } } public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_part_specs_by_filter_call method_call = new get_part_specs_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_part_specs_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String filter; private int max_parts; public get_part_specs_by_filter_call(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.filter = filter; this.max_parts = max_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_part_specs_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); args.setMax_parts(max_parts); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_part_specs_by_filter(); } } public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_by_expr_call method_call = new get_partitions_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { private PartitionsByExprRequest req; public get_partitions_by_expr_call(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_by_expr_args args = new get_partitions_by_expr_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public PartitionsByExprResult getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_by_expr(); } } public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_by_names_call method_call = new get_partitions_by_names_call(db_name, tbl_name, names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_by_names_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List names; public get_partitions_by_names_call(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.names = names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_by_names_args args = new get_partitions_by_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNames(names); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_by_names(); } } public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private Partition new_part; public alter_partition_call(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.new_part = new_part; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_partition_args args = new alter_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_part(new_part); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_partition(); } } public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_partitions_call method_call = new alter_partitions_call(db_name, tbl_name, new_parts, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List new_parts; public alter_partitions_call(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.new_parts = new_parts; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_partitions_args args = new alter_partitions_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_parts(new_parts); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_partitions(); } } public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_partition_with_environment_context_call method_call = new alter_partition_with_environment_context_call(db_name, tbl_name, new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private Partition new_part; private EnvironmentContext environment_context; public alter_partition_with_environment_context_call(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.new_part = new_part; this.environment_context = environment_context; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_part(new_part); args.setEnvironment_context(environment_context); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_partition_with_environment_context(); } } public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); rename_partition_call method_call = new rename_partition_call(db_name, tbl_name, part_vals, new_part, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rename_partition_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List part_vals; private Partition new_part; public rename_partition_call(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.new_part = new_part; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); rename_partition_args args = new rename_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setNew_part(new_part); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_rename_partition(); } } public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); partition_name_has_valid_characters_call method_call = new partition_name_has_valid_characters_call(part_vals, throw_exception, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class partition_name_has_valid_characters_call extends org.apache.thrift.async.TAsyncMethodCall { private List part_vals; private boolean throw_exception; public partition_name_has_valid_characters_call(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.part_vals = part_vals; this.throw_exception = throw_exception; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_has_valid_characters", org.apache.thrift.protocol.TMessageType.CALL, 0)); partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); args.setPart_vals(part_vals); args.setThrow_exception(throw_exception); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_partition_name_has_valid_characters(); } } public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_config_value_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; private String defaultValue; public get_config_value_call(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.defaultValue = defaultValue; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_config_value", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_config_value_args args = new get_config_value_args(); args.setName(name); args.setDefaultValue(defaultValue); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws ConfigValSecurityException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_config_value(); } } public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class partition_name_to_vals_call extends org.apache.thrift.async.TAsyncMethodCall { private String part_name; public partition_name_to_vals_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.part_name = part_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_vals", org.apache.thrift.protocol.TMessageType.CALL, 0)); partition_name_to_vals_args args = new partition_name_to_vals_args(); args.setPart_name(part_name); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, 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_partition_name_to_vals(); } } public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class partition_name_to_spec_call extends org.apache.thrift.async.TAsyncMethodCall { private String part_name; public partition_name_to_spec_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.part_name = part_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_spec", org.apache.thrift.protocol.TMessageType.CALL, 0)); partition_name_to_spec_args args = new partition_name_to_spec_args(); args.setPart_name(part_name); args.write(prot); prot.writeMessageEnd(); } public Map getResult() throws MetaException, 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_partition_name_to_spec(); } } public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); markPartitionForEvent_call method_call = new markPartitionForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class markPartitionForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private Map part_vals; private PartitionEventType eventType; public markPartitionForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.eventType = eventType; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPartitionForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); markPartitionForEvent_args args = new markPartitionForEvent_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEventType(eventType); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, 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_markPartitionForEvent(); } } public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); isPartitionMarkedForEvent_call method_call = new isPartitionMarkedForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class isPartitionMarkedForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private Map part_vals; private PartitionEventType eventType; public isPartitionMarkedForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.eventType = eventType; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isPartitionMarkedForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_vals(part_vals); args.setEventType(eventType); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, 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_isPartitionMarkedForEvent(); } } public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_index_call extends org.apache.thrift.async.TAsyncMethodCall { private Index new_index; private Table index_table; public add_index_call(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.new_index = new_index; this.index_table = index_table; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_index_args args = new add_index_args(); args.setNew_index(new_index); args.setIndex_table(index_table); args.write(prot); prot.writeMessageEnd(); } public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_index(); } } public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_index_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbname; private String base_tbl_name; private String idx_name; private Index new_idx; public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; this.base_tbl_name = base_tbl_name; this.idx_name = idx_name; this.new_idx = new_idx; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_index_args args = new alter_index_args(); args.setDbname(dbname); args.setBase_tbl_name(base_tbl_name); args.setIdx_name(idx_name); args.setNew_idx(new_idx); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_index(); } } public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String index_name; private boolean deleteData; public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.index_name = index_name; this.deleteData = deleteData; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_index_by_name_args args = new drop_index_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setIndex_name(index_name); args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, 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_drop_index_by_name(); } } public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String index_name; public get_index_by_name_call(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.index_name = index_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_index_by_name_args args = new get_index_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setIndex_name(index_name); args.write(prot); prot.writeMessageEnd(); } public Index getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_index_by_name(); } } public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_indexes_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private short max_indexes; public get_indexes_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_indexes", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_indexes_args args = new get_indexes_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_indexes(max_indexes); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_indexes(); } } public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_index_names_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private short max_indexes; public get_index_names_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_index_names_args args = new get_index_names_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setMax_indexes(max_indexes); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_index_names(); } } public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); update_table_column_statistics_call method_call = new update_table_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class update_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private ColumnStatistics stats_obj; public update_table_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.stats_obj = stats_obj; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); update_table_column_statistics_args args = new update_table_column_statistics_args(); args.setStats_obj(stats_obj); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, 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_update_table_column_statistics(); } } public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); update_partition_column_statistics_call method_call = new update_partition_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class update_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private ColumnStatistics stats_obj; public update_partition_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.stats_obj = stats_obj; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); update_partition_column_statistics_args args = new update_partition_column_statistics_args(); args.setStats_obj(stats_obj); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, 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_update_partition_column_statistics(); } } public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_column_statistics_call method_call = new get_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String col_name; public get_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.col_name = col_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_column_statistics_args args = new get_table_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setCol_name(col_name); args.write(prot); prot.writeMessageEnd(); } public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_column_statistics(); } } public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partition_column_statistics_call method_call = new get_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; private String col_name; public get_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.col_name = col_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partition_column_statistics_args args = new get_partition_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setCol_name(col_name); args.write(prot); prot.writeMessageEnd(); } public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partition_column_statistics(); } } public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_statistics_req_call method_call = new get_table_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { private TableStatsRequest request; public get_table_statistics_req_call(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_statistics_req_args args = new get_table_statistics_req_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public TableStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_statistics_req(); } } public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_partitions_statistics_req_call method_call = new get_partitions_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_partitions_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { private PartitionsStatsRequest request; public get_partitions_statistics_req_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public PartitionsStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_partitions_statistics_req(); } } public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_aggr_stats_for_call method_call = new get_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { private PartitionsStatsRequest request; public get_aggr_stats_for_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_aggr_stats_for_args args = new get_aggr_stats_for_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public AggrStats getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_aggr_stats_for(); } } public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); set_aggr_stats_for_call method_call = new set_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { private SetPartitionsStatsRequest request; public set_aggr_stats_for_call(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_aggr_stats_for_args args = new set_aggr_stats_for_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, 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_set_aggr_stats_for(); } } public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); delete_partition_column_statistics_call method_call = new delete_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String part_name; private String col_name; public delete_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.col_name = col_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setPart_name(part_name); args.setCol_name(col_name); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, 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_delete_partition_column_statistics(); } } public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); delete_table_column_statistics_call method_call = new delete_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String col_name; public delete_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; this.col_name = col_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_table_column_statistics_args args = new delete_table_column_statistics_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setCol_name(col_name); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, 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_delete_table_column_statistics(); } } public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_function_call method_call = new create_function_call(func, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_function_call extends org.apache.thrift.async.TAsyncMethodCall { private Function func; public create_function_call(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.func = func; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_function_args args = new create_function_args(); args.setFunc(func); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, 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_create_function(); } } public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_function_call method_call = new drop_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_function_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbName; private String funcName; public drop_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbName = dbName; this.funcName = funcName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_function_args args = new drop_function_args(); args.setDbName(dbName); args.setFuncName(funcName); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchObjectException, MetaException, 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_drop_function(); } } public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_function_call method_call = new alter_function_call(dbName, funcName, newFunc, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_function_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbName; private String funcName; private Function newFunc; public alter_function_call(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbName = dbName; this.funcName = funcName; this.newFunc = newFunc; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_function_args args = new alter_function_args(); args.setDbName(dbName); args.setFuncName(funcName); args.setNewFunc(newFunc); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws InvalidOperationException, MetaException, 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_alter_function(); } } public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_functions_call method_call = new get_functions_call(dbName, pattern, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_functions_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbName; private String pattern; public get_functions_call(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbName = dbName; this.pattern = pattern; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_functions_args args = new get_functions_args(); args.setDbName(dbName); args.setPattern(pattern); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_functions(); } } public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_function_call method_call = new get_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_function_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbName; private String funcName; public get_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.dbName = dbName; this.funcName = funcName; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_function_args args = new get_function_args(); args.setDbName(dbName); args.setFuncName(funcName); args.write(prot); prot.writeMessageEnd(); } public Function getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_function(); } } public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_role_call method_call = new create_role_call(role, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_role_call extends org.apache.thrift.async.TAsyncMethodCall { private Role role; public create_role_call(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.role = role; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_role_args args = new create_role_args(); args.setRole(role); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_create_role(); } } public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_role_call method_call = new drop_role_call(role_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_role_call extends org.apache.thrift.async.TAsyncMethodCall { private String role_name; public drop_role_call(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.role_name = role_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_role_args args = new drop_role_args(); args.setRole_name(role_name); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_drop_role(); } } public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_role_names_call method_call = new get_role_names_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_role_names_call extends org.apache.thrift.async.TAsyncMethodCall { public get_role_names_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_role_names_args args = new get_role_names_args(); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_role_names(); } } public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); grant_role_call method_call = new grant_role_call(role_name, principal_name, principal_type, grantor, grantorType, grant_option, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grant_role_call extends org.apache.thrift.async.TAsyncMethodCall { private String role_name; private String principal_name; private PrincipalType principal_type; private String grantor; private PrincipalType grantorType; private boolean grant_option; public grant_role_call(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.role_name = role_name; this.principal_name = principal_name; this.principal_type = principal_type; this.grantor = grantor; this.grantorType = grantorType; this.grant_option = grant_option; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); grant_role_args args = new grant_role_args(); args.setRole_name(role_name); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.setGrantor(grantor); args.setGrantorType(grantorType); args.setGrant_option(grant_option); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_grant_role(); } } public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); revoke_role_call method_call = new revoke_role_call(role_name, principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { private String role_name; private String principal_name; private PrincipalType principal_type; public revoke_role_call(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.role_name = role_name; this.principal_name = principal_name; this.principal_type = principal_type; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); revoke_role_args args = new revoke_role_args(); args.setRole_name(role_name); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_revoke_role(); } } public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); list_roles_call method_call = new list_roles_call(principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class list_roles_call extends org.apache.thrift.async.TAsyncMethodCall { private String principal_name; private PrincipalType principal_type; public list_roles_call(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.principal_name = principal_name; this.principal_type = principal_type; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_roles", org.apache.thrift.protocol.TMessageType.CALL, 0)); list_roles_args args = new list_roles_args(); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, 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_list_roles(); } } public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); grant_revoke_role_call method_call = new grant_revoke_role_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grant_revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { private GrantRevokeRoleRequest request; public grant_revoke_role_call(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); grant_revoke_role_args args = new grant_revoke_role_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public GrantRevokeRoleResponse getResult() throws MetaException, 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_grant_revoke_role(); } } public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_principals_in_role_call method_call = new get_principals_in_role_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_principals_in_role_call extends org.apache.thrift.async.TAsyncMethodCall { private GetPrincipalsInRoleRequest request; public get_principals_in_role_call(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_principals_in_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_principals_in_role_args args = new get_principals_in_role_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public GetPrincipalsInRoleResponse getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_principals_in_role(); } } public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_role_grants_for_principal_call method_call = new get_role_grants_for_principal_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_role_grants_for_principal_call extends org.apache.thrift.async.TAsyncMethodCall { private GetRoleGrantsForPrincipalRequest request; public get_role_grants_for_principal_call(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_grants_for_principal", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public GetRoleGrantsForPrincipalResponse getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_role_grants_for_principal(); } } public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_privilege_set_call method_call = new get_privilege_set_call(hiveObject, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_privilege_set_call extends org.apache.thrift.async.TAsyncMethodCall { private HiveObjectRef hiveObject; private String user_name; private List group_names; public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.hiveObject = hiveObject; this.user_name = user_name; this.group_names = group_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_privilege_set", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_privilege_set_args args = new get_privilege_set_args(); args.setHiveObject(hiveObject); args.setUser_name(user_name); args.setGroup_names(group_names); args.write(prot); prot.writeMessageEnd(); } public PrincipalPrivilegeSet getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_privilege_set(); } } public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); list_privileges_call method_call = new list_privileges_call(principal_name, principal_type, hiveObject, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class list_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { private String principal_name; private PrincipalType principal_type; private HiveObjectRef hiveObject; public list_privileges_call(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.principal_name = principal_name; this.principal_type = principal_type; this.hiveObject = hiveObject; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); list_privileges_args args = new list_privileges_args(); args.setPrincipal_name(principal_name); args.setPrincipal_type(principal_type); args.setHiveObject(hiveObject); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, 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_list_privileges(); } } public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); grant_privileges_call method_call = new grant_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grant_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { private PrivilegeBag privileges; public grant_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.privileges = privileges; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); grant_privileges_args args = new grant_privileges_args(); args.setPrivileges(privileges); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_grant_privileges(); } } public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); revoke_privileges_call method_call = new revoke_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { private PrivilegeBag privileges; public revoke_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.privileges = privileges; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); revoke_privileges_args args = new revoke_privileges_args(); args.setPrivileges(privileges); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws MetaException, 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_revoke_privileges(); } } public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); grant_revoke_privileges_call method_call = new grant_revoke_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grant_revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { private GrantRevokePrivilegeRequest request; public grant_revoke_privileges_call(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); grant_revoke_privileges_args args = new grant_revoke_privileges_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public GrantRevokePrivilegeResponse getResult() throws MetaException, 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_grant_revoke_privileges(); } } public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); set_ugi_call method_call = new set_ugi_call(user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_ugi_call extends org.apache.thrift.async.TAsyncMethodCall { private String user_name; private List group_names; public set_ugi_call(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.user_name = user_name; this.group_names = group_names; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_ugi", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_ugi_args args = new set_ugi_args(); args.setUser_name(user_name); args.setGroup_names(group_names); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws MetaException, 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_set_ugi(); } } public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_delegation_token_call method_call = new get_delegation_token_call(token_owner, renewer_kerberos_principal_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_owner; private String renewer_kerberos_principal_name; public get_delegation_token_call(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token_owner = token_owner; this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_delegation_token_args args = new get_delegation_token_args(); args.setToken_owner(token_owner); args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws MetaException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_delegation_token(); } } public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); renew_delegation_token_call method_call = new renew_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class renew_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_str_form; public renew_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token_str_form = token_str_form; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renew_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); renew_delegation_token_args args = new renew_delegation_token_args(); args.setToken_str_form(token_str_form); args.write(prot); prot.writeMessageEnd(); } public long getResult() throws MetaException, 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_renew_delegation_token(); } } public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); cancel_delegation_token_call method_call = new cancel_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class cancel_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_str_form; public cancel_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token_str_form = token_str_form; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancel_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); cancel_delegation_token_args args = new cancel_delegation_token_args(); args.setToken_str_form(token_str_form); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws MetaException, 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_cancel_delegation_token(); } } public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_open_txns_call method_call = new get_open_txns_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { public get_open_txns_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_open_txns_args args = new get_open_txns_args(); args.write(prot); prot.writeMessageEnd(); } public GetOpenTxnsResponse getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_open_txns(); } } public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_open_txns_info_call method_call = new get_open_txns_info_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_open_txns_info_call extends org.apache.thrift.async.TAsyncMethodCall { public get_open_txns_info_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_open_txns_info_args args = new get_open_txns_info_args(); args.write(prot); prot.writeMessageEnd(); } public GetOpenTxnsInfoResponse getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_open_txns_info(); } } public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); open_txns_call method_call = new open_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { private OpenTxnRequest rqst; public open_txns_call(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); open_txns_args args = new open_txns_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public OpenTxnsResponse 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_open_txns(); } } public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); abort_txn_call method_call = new abort_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class abort_txn_call extends org.apache.thrift.async.TAsyncMethodCall { private AbortTxnRequest rqst; public abort_txn_call(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); abort_txn_args args = new abort_txn_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchTxnException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_abort_txn(); } } public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); commit_txn_call method_call = new commit_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class commit_txn_call extends org.apache.thrift.async.TAsyncMethodCall { private CommitTxnRequest rqst; public commit_txn_call(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commit_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); commit_txn_args args = new commit_txn_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchTxnException, TxnAbortedException, 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_commit_txn(); } } public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); lock_call method_call = new lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lock_call extends org.apache.thrift.async.TAsyncMethodCall { private LockRequest rqst; public lock_call(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); lock_args args = new lock_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, 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_lock(); } } public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); check_lock_call method_call = new check_lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class check_lock_call extends org.apache.thrift.async.TAsyncMethodCall { private CheckLockRequest rqst; public check_lock_call(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("check_lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); check_lock_args args = new check_lock_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, 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_check_lock(); } } public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); unlock_call method_call = new unlock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class unlock_call extends org.apache.thrift.async.TAsyncMethodCall { private UnlockRequest rqst; public unlock_call(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlock", org.apache.thrift.protocol.TMessageType.CALL, 0)); unlock_args args = new unlock_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchLockException, TxnOpenException, 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_unlock(); } } public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); show_locks_call method_call = new show_locks_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class show_locks_call extends org.apache.thrift.async.TAsyncMethodCall { private ShowLocksRequest rqst; public show_locks_call(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_locks", org.apache.thrift.protocol.TMessageType.CALL, 0)); show_locks_args args = new show_locks_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public ShowLocksResponse 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_show_locks(); } } public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); heartbeat_call method_call = new heartbeat_call(ids, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class heartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { private HeartbeatRequest ids; public heartbeat_call(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.ids = ids; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); heartbeat_args args = new heartbeat_args(); args.setIds(ids); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, 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_heartbeat(); } } public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); heartbeat_txn_range_call method_call = new heartbeat_txn_range_call(txns, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class heartbeat_txn_range_call extends org.apache.thrift.async.TAsyncMethodCall { private HeartbeatTxnRangeRequest txns; public heartbeat_txn_range_call(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.txns = txns; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat_txn_range", org.apache.thrift.protocol.TMessageType.CALL, 0)); heartbeat_txn_range_args args = new heartbeat_txn_range_args(); args.setTxns(txns); args.write(prot); prot.writeMessageEnd(); } public HeartbeatTxnRangeResponse 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_heartbeat_txn_range(); } } public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); compact_call method_call = new compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class compact_call extends org.apache.thrift.async.TAsyncMethodCall { private CompactionRequest rqst; public compact_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); compact_args args = new compact_args(); args.setRqst(rqst); 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_compact(); } } public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); show_compact_call method_call = new show_compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class show_compact_call extends org.apache.thrift.async.TAsyncMethodCall { private ShowCompactRequest rqst; public show_compact_call(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); show_compact_args args = new show_compact_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public ShowCompactResponse 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_show_compact(); } } public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_dynamic_partitions_call method_call = new add_dynamic_partitions_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_dynamic_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { private AddDynamicPartitions rqst; public add_dynamic_partitions_call(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_dynamic_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_dynamic_partitions_args args = new add_dynamic_partitions_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws NoSuchTxnException, TxnAbortedException, 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_add_dynamic_partitions(); } } public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_next_notification_call method_call = new get_next_notification_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_next_notification_call extends org.apache.thrift.async.TAsyncMethodCall { private NotificationEventRequest rqst; public get_next_notification_call(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_next_notification", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_next_notification_args args = new get_next_notification_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public NotificationEventResponse getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_next_notification(); } } public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_current_notificationEventId_call method_call = new get_current_notificationEventId_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_current_notificationEventId_call extends org.apache.thrift.async.TAsyncMethodCall { public get_current_notificationEventId_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_current_notificationEventId", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_current_notificationEventId_args args = new get_current_notificationEventId_args(); args.write(prot); prot.writeMessageEnd(); } public CurrentNotificationEventId getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_current_notificationEventId(); } } public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); fire_listener_event_call method_call = new fire_listener_event_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class fire_listener_event_call extends org.apache.thrift.async.TAsyncMethodCall { private FireEventRequest rqst; public fire_listener_event_call(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.rqst = rqst; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fire_listener_event", org.apache.thrift.protocol.TMessageType.CALL, 0)); fire_listener_event_args args = new fire_listener_event_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public FireEventResponse 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_fire_listener_event(); } } } public static class Processor extends com.facebook.fb303.FacebookService.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>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("getMetaConf", new getMetaConf()); processMap.put("setMetaConf", new setMetaConf()); processMap.put("create_database", new create_database()); processMap.put("get_database", new get_database()); processMap.put("drop_database", new drop_database()); processMap.put("get_databases", new get_databases()); processMap.put("get_all_databases", new get_all_databases()); processMap.put("alter_database", new alter_database()); processMap.put("get_type", new get_type()); processMap.put("create_type", new create_type()); processMap.put("drop_type", new drop_type()); processMap.put("get_type_all", new get_type_all()); processMap.put("get_fields", new get_fields()); processMap.put("get_fields_with_environment_context", new get_fields_with_environment_context()); processMap.put("get_schema", new get_schema()); processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); processMap.put("create_table", new create_table()); processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); processMap.put("drop_table", new drop_table()); processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); processMap.put("get_tables", new get_tables()); processMap.put("get_all_tables", new get_all_tables()); processMap.put("get_table", new get_table()); processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); processMap.put("alter_table", new alter_table()); processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context()); processMap.put("alter_table_with_cascade", new alter_table_with_cascade()); processMap.put("add_partition", new add_partition()); processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context()); processMap.put("add_partitions", new add_partitions()); processMap.put("add_partitions_pspec", new add_partitions_pspec()); processMap.put("append_partition", new append_partition()); processMap.put("add_partitions_req", new add_partitions_req()); processMap.put("append_partition_with_environment_context", new append_partition_with_environment_context()); processMap.put("append_partition_by_name", new append_partition_by_name()); processMap.put("append_partition_by_name_with_environment_context", new append_partition_by_name_with_environment_context()); processMap.put("drop_partition", new drop_partition()); processMap.put("drop_partition_with_environment_context", new drop_partition_with_environment_context()); processMap.put("drop_partition_by_name", new drop_partition_by_name()); processMap.put("drop_partition_by_name_with_environment_context", new drop_partition_by_name_with_environment_context()); processMap.put("drop_partitions_req", new drop_partitions_req()); processMap.put("get_partition", new get_partition()); processMap.put("exchange_partition", new exchange_partition()); processMap.put("get_partition_with_auth", new get_partition_with_auth()); processMap.put("get_partition_by_name", new get_partition_by_name()); processMap.put("get_partitions", new get_partitions()); processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); processMap.put("get_partitions_pspec", new get_partitions_pspec()); processMap.put("get_partition_names", new get_partition_names()); processMap.put("get_partitions_ps", new get_partitions_ps()); processMap.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); processMap.put("get_partition_names_ps", new get_partition_names_ps()); processMap.put("get_partitions_by_filter", new get_partitions_by_filter()); processMap.put("get_part_specs_by_filter", new get_part_specs_by_filter()); processMap.put("get_partitions_by_expr", new get_partitions_by_expr()); processMap.put("get_partitions_by_names", new get_partitions_by_names()); processMap.put("alter_partition", new alter_partition()); processMap.put("alter_partitions", new alter_partitions()); processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context()); processMap.put("rename_partition", new rename_partition()); processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters()); processMap.put("get_config_value", new get_config_value()); processMap.put("partition_name_to_vals", new partition_name_to_vals()); processMap.put("partition_name_to_spec", new partition_name_to_spec()); processMap.put("markPartitionForEvent", new markPartitionForEvent()); processMap.put("isPartitionMarkedForEvent", new isPartitionMarkedForEvent()); processMap.put("add_index", new add_index()); processMap.put("alter_index", new alter_index()); processMap.put("drop_index_by_name", new drop_index_by_name()); processMap.put("get_index_by_name", new get_index_by_name()); processMap.put("get_indexes", new get_indexes()); processMap.put("get_index_names", new get_index_names()); processMap.put("update_table_column_statistics", new update_table_column_statistics()); processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); processMap.put("get_table_column_statistics", new get_table_column_statistics()); processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); processMap.put("get_table_statistics_req", new get_table_statistics_req()); processMap.put("get_partitions_statistics_req", new get_partitions_statistics_req()); processMap.put("get_aggr_stats_for", new get_aggr_stats_for()); processMap.put("set_aggr_stats_for", new set_aggr_stats_for()); processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); processMap.put("create_function", new create_function()); processMap.put("drop_function", new drop_function()); processMap.put("alter_function", new alter_function()); processMap.put("get_functions", new get_functions()); processMap.put("get_function", new get_function()); processMap.put("create_role", new create_role()); processMap.put("drop_role", new drop_role()); processMap.put("get_role_names", new get_role_names()); processMap.put("grant_role", new grant_role()); processMap.put("revoke_role", new revoke_role()); processMap.put("list_roles", new list_roles()); processMap.put("grant_revoke_role", new grant_revoke_role()); processMap.put("get_principals_in_role", new get_principals_in_role()); processMap.put("get_role_grants_for_principal", new get_role_grants_for_principal()); processMap.put("get_privilege_set", new get_privilege_set()); processMap.put("list_privileges", new list_privileges()); processMap.put("grant_privileges", new grant_privileges()); processMap.put("revoke_privileges", new revoke_privileges()); processMap.put("grant_revoke_privileges", new grant_revoke_privileges()); processMap.put("set_ugi", new set_ugi()); processMap.put("get_delegation_token", new get_delegation_token()); processMap.put("renew_delegation_token", new renew_delegation_token()); processMap.put("cancel_delegation_token", new cancel_delegation_token()); processMap.put("get_open_txns", new get_open_txns()); processMap.put("get_open_txns_info", new get_open_txns_info()); processMap.put("open_txns", new open_txns()); processMap.put("abort_txn", new abort_txn()); processMap.put("commit_txn", new commit_txn()); processMap.put("lock", new lock()); processMap.put("check_lock", new check_lock()); processMap.put("unlock", new unlock()); processMap.put("show_locks", new show_locks()); processMap.put("heartbeat", new heartbeat()); processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); processMap.put("compact", new compact()); processMap.put("show_compact", new show_compact()); processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); processMap.put("get_next_notification", new get_next_notification()); processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); processMap.put("fire_listener_event", new fire_listener_event()); return processMap; } public static class getMetaConf extends org.apache.thrift.ProcessFunction { public getMetaConf() { super("getMetaConf"); } public getMetaConf_args getEmptyArgsInstance() { return new getMetaConf_args(); } protected boolean isOneway() { return false; } public getMetaConf_result getResult(I iface, getMetaConf_args args) throws org.apache.thrift.TException { getMetaConf_result result = new getMetaConf_result(); try { result.success = iface.getMetaConf(args.key); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class setMetaConf extends org.apache.thrift.ProcessFunction { public setMetaConf() { super("setMetaConf"); } public setMetaConf_args getEmptyArgsInstance() { return new setMetaConf_args(); } protected boolean isOneway() { return false; } public setMetaConf_result getResult(I iface, setMetaConf_args args) throws org.apache.thrift.TException { setMetaConf_result result = new setMetaConf_result(); try { iface.setMetaConf(args.key, args.value); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class create_database extends org.apache.thrift.ProcessFunction { public create_database() { super("create_database"); } public create_database_args getEmptyArgsInstance() { return new create_database_args(); } protected boolean isOneway() { return false; } public create_database_result getResult(I iface, create_database_args args) throws org.apache.thrift.TException { create_database_result result = new create_database_result(); try { iface.create_database(args.database); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class get_database extends org.apache.thrift.ProcessFunction { public get_database() { super("get_database"); } public get_database_args getEmptyArgsInstance() { return new get_database_args(); } protected boolean isOneway() { return false; } public get_database_result getResult(I iface, get_database_args args) throws org.apache.thrift.TException { get_database_result result = new get_database_result(); try { result.success = iface.get_database(args.name); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_database extends org.apache.thrift.ProcessFunction { public drop_database() { super("drop_database"); } public drop_database_args getEmptyArgsInstance() { return new drop_database_args(); } protected boolean isOneway() { return false; } public drop_database_result getResult(I iface, drop_database_args args) throws org.apache.thrift.TException { drop_database_result result = new drop_database_result(); try { iface.drop_database(args.name, args.deleteData, args.cascade); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (InvalidOperationException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class get_databases extends org.apache.thrift.ProcessFunction { public get_databases() { super("get_databases"); } public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } protected boolean isOneway() { return false; } public get_databases_result getResult(I iface, get_databases_args args) throws org.apache.thrift.TException { get_databases_result result = new get_databases_result(); try { result.success = iface.get_databases(args.pattern); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_all_databases extends org.apache.thrift.ProcessFunction { public get_all_databases() { super("get_all_databases"); } public get_all_databases_args getEmptyArgsInstance() { return new get_all_databases_args(); } protected boolean isOneway() { return false; } public get_all_databases_result getResult(I iface, get_all_databases_args args) throws org.apache.thrift.TException { get_all_databases_result result = new get_all_databases_result(); try { result.success = iface.get_all_databases(); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class alter_database extends org.apache.thrift.ProcessFunction { public alter_database() { super("alter_database"); } public alter_database_args getEmptyArgsInstance() { return new alter_database_args(); } protected boolean isOneway() { return false; } public alter_database_result getResult(I iface, alter_database_args args) throws org.apache.thrift.TException { alter_database_result result = new alter_database_result(); try { iface.alter_database(args.dbname, args.db); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_type extends org.apache.thrift.ProcessFunction { public get_type() { super("get_type"); } public get_type_args getEmptyArgsInstance() { return new get_type_args(); } protected boolean isOneway() { return false; } public get_type_result getResult(I iface, get_type_args args) throws org.apache.thrift.TException { get_type_result result = new get_type_result(); try { result.success = iface.get_type(args.name); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class create_type extends org.apache.thrift.ProcessFunction { public create_type() { super("create_type"); } public create_type_args getEmptyArgsInstance() { return new create_type_args(); } protected boolean isOneway() { return false; } public create_type_result getResult(I iface, create_type_args args) throws org.apache.thrift.TException { create_type_result result = new create_type_result(); try { result.success = iface.create_type(args.type); result.setSuccessIsSet(true); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class drop_type extends org.apache.thrift.ProcessFunction { public drop_type() { super("drop_type"); } public drop_type_args getEmptyArgsInstance() { return new drop_type_args(); } protected boolean isOneway() { return false; } public drop_type_result getResult(I iface, drop_type_args args) throws org.apache.thrift.TException { drop_type_result result = new drop_type_result(); try { result.success = iface.drop_type(args.type); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_type_all extends org.apache.thrift.ProcessFunction { public get_type_all() { super("get_type_all"); } public get_type_all_args getEmptyArgsInstance() { return new get_type_all_args(); } protected boolean isOneway() { return false; } public get_type_all_result getResult(I iface, get_type_all_args args) throws org.apache.thrift.TException { get_type_all_result result = new get_type_all_result(); try { result.success = iface.get_type_all(args.name); } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_fields extends org.apache.thrift.ProcessFunction { public get_fields() { super("get_fields"); } public get_fields_args getEmptyArgsInstance() { return new get_fields_args(); } protected boolean isOneway() { return false; } public get_fields_result getResult(I iface, get_fields_args args) throws org.apache.thrift.TException { get_fields_result result = new get_fields_result(); try { result.success = iface.get_fields(args.db_name, args.table_name); } catch (MetaException o1) { result.o1 = o1; } catch (UnknownTableException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class get_fields_with_environment_context extends org.apache.thrift.ProcessFunction { public get_fields_with_environment_context() { super("get_fields_with_environment_context"); } public get_fields_with_environment_context_args getEmptyArgsInstance() { return new get_fields_with_environment_context_args(); } protected boolean isOneway() { return false; } public get_fields_with_environment_context_result getResult(I iface, get_fields_with_environment_context_args args) throws org.apache.thrift.TException { get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); try { result.success = iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context); } catch (MetaException o1) { result.o1 = o1; } catch (UnknownTableException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class get_schema extends org.apache.thrift.ProcessFunction { public get_schema() { super("get_schema"); } public get_schema_args getEmptyArgsInstance() { return new get_schema_args(); } protected boolean isOneway() { return false; } public get_schema_result getResult(I iface, get_schema_args args) throws org.apache.thrift.TException { get_schema_result result = new get_schema_result(); try { result.success = iface.get_schema(args.db_name, args.table_name); } catch (MetaException o1) { result.o1 = o1; } catch (UnknownTableException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class get_schema_with_environment_context extends org.apache.thrift.ProcessFunction { public get_schema_with_environment_context() { super("get_schema_with_environment_context"); } public get_schema_with_environment_context_args getEmptyArgsInstance() { return new get_schema_with_environment_context_args(); } protected boolean isOneway() { return false; } public get_schema_with_environment_context_result getResult(I iface, get_schema_with_environment_context_args args) throws org.apache.thrift.TException { get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); try { result.success = iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context); } catch (MetaException o1) { result.o1 = o1; } catch (UnknownTableException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class create_table extends org.apache.thrift.ProcessFunction { public create_table() { super("create_table"); } public create_table_args getEmptyArgsInstance() { return new create_table_args(); } protected boolean isOneway() { return false; } public create_table_result getResult(I iface, create_table_args args) throws org.apache.thrift.TException { create_table_result result = new create_table_result(); try { iface.create_table(args.tbl); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (NoSuchObjectException o4) { result.o4 = o4; } return result; } } public static class create_table_with_environment_context extends org.apache.thrift.ProcessFunction { public create_table_with_environment_context() { super("create_table_with_environment_context"); } public create_table_with_environment_context_args getEmptyArgsInstance() { return new create_table_with_environment_context_args(); } protected boolean isOneway() { return false; } public create_table_with_environment_context_result getResult(I iface, create_table_with_environment_context_args args) throws org.apache.thrift.TException { create_table_with_environment_context_result result = new create_table_with_environment_context_result(); try { iface.create_table_with_environment_context(args.tbl, args.environment_context); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (NoSuchObjectException o4) { result.o4 = o4; } return result; } } public static class drop_table extends org.apache.thrift.ProcessFunction { public drop_table() { super("drop_table"); } public drop_table_args getEmptyArgsInstance() { return new drop_table_args(); } protected boolean isOneway() { return false; } public drop_table_result getResult(I iface, drop_table_args args) throws org.apache.thrift.TException { drop_table_result result = new drop_table_result(); try { iface.drop_table(args.dbname, args.name, args.deleteData); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class drop_table_with_environment_context extends org.apache.thrift.ProcessFunction { public drop_table_with_environment_context() { super("drop_table_with_environment_context"); } public drop_table_with_environment_context_args getEmptyArgsInstance() { return new drop_table_with_environment_context_args(); } protected boolean isOneway() { return false; } public drop_table_with_environment_context_result getResult(I iface, drop_table_with_environment_context_args args) throws org.apache.thrift.TException { drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); try { iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class get_tables extends org.apache.thrift.ProcessFunction { public get_tables() { super("get_tables"); } public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } protected boolean isOneway() { return false; } public get_tables_result getResult(I iface, get_tables_args args) throws org.apache.thrift.TException { get_tables_result result = new get_tables_result(); try { result.success = iface.get_tables(args.db_name, args.pattern); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_all_tables extends org.apache.thrift.ProcessFunction { public get_all_tables() { super("get_all_tables"); } public get_all_tables_args getEmptyArgsInstance() { return new get_all_tables_args(); } protected boolean isOneway() { return false; } public get_all_tables_result getResult(I iface, get_all_tables_args args) throws org.apache.thrift.TException { get_all_tables_result result = new get_all_tables_result(); try { result.success = iface.get_all_tables(args.db_name); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_table extends org.apache.thrift.ProcessFunction { public get_table() { super("get_table"); } public get_table_args getEmptyArgsInstance() { return new get_table_args(); } protected boolean isOneway() { return false; } public get_table_result getResult(I iface, get_table_args args) throws org.apache.thrift.TException { get_table_result result = new get_table_result(); try { result.success = iface.get_table(args.dbname, args.tbl_name); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_table_objects_by_name extends org.apache.thrift.ProcessFunction { public get_table_objects_by_name() { super("get_table_objects_by_name"); } public get_table_objects_by_name_args getEmptyArgsInstance() { return new get_table_objects_by_name_args(); } protected boolean isOneway() { return false; } public get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); try { result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); } catch (MetaException o1) { result.o1 = o1; } catch (InvalidOperationException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class get_table_names_by_filter extends org.apache.thrift.ProcessFunction { public get_table_names_by_filter() { super("get_table_names_by_filter"); } public get_table_names_by_filter_args getEmptyArgsInstance() { return new get_table_names_by_filter_args(); } protected boolean isOneway() { return false; } public get_table_names_by_filter_result getResult(I iface, get_table_names_by_filter_args args) throws org.apache.thrift.TException { get_table_names_by_filter_result result = new get_table_names_by_filter_result(); try { result.success = iface.get_table_names_by_filter(args.dbname, args.filter, args.max_tables); } catch (MetaException o1) { result.o1 = o1; } catch (InvalidOperationException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } public static class alter_table extends org.apache.thrift.ProcessFunction { public alter_table() { super("alter_table"); } public alter_table_args getEmptyArgsInstance() { return new alter_table_args(); } protected boolean isOneway() { return false; } public alter_table_result getResult(I iface, alter_table_args args) throws org.apache.thrift.TException { alter_table_result result = new alter_table_result(); try { iface.alter_table(args.dbname, args.tbl_name, args.new_tbl); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class alter_table_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_table_with_environment_context() { super("alter_table_with_environment_context"); } public alter_table_with_environment_context_args getEmptyArgsInstance() { return new alter_table_with_environment_context_args(); } protected boolean isOneway() { return false; } public alter_table_with_environment_context_result getResult(I iface, alter_table_with_environment_context_args args) throws org.apache.thrift.TException { alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); try { iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class alter_table_with_cascade extends org.apache.thrift.ProcessFunction { public alter_table_with_cascade() { super("alter_table_with_cascade"); } public alter_table_with_cascade_args getEmptyArgsInstance() { return new alter_table_with_cascade_args(); } protected boolean isOneway() { return false; } public alter_table_with_cascade_result getResult(I iface, alter_table_with_cascade_args args) throws org.apache.thrift.TException { alter_table_with_cascade_result result = new alter_table_with_cascade_result(); try { iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class add_partition extends org.apache.thrift.ProcessFunction { public add_partition() { super("add_partition"); } public add_partition_args getEmptyArgsInstance() { return new add_partition_args(); } protected boolean isOneway() { return false; } public add_partition_result getResult(I iface, add_partition_args args) throws org.apache.thrift.TException { add_partition_result result = new add_partition_result(); try { result.success = iface.add_partition(args.new_part); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class add_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public add_partition_with_environment_context() { super("add_partition_with_environment_context"); } public add_partition_with_environment_context_args getEmptyArgsInstance() { return new add_partition_with_environment_context_args(); } protected boolean isOneway() { return false; } public add_partition_with_environment_context_result getResult(I iface, add_partition_with_environment_context_args args) throws org.apache.thrift.TException { add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); try { result.success = iface.add_partition_with_environment_context(args.new_part, args.environment_context); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class add_partitions extends org.apache.thrift.ProcessFunction { public add_partitions() { super("add_partitions"); } public add_partitions_args getEmptyArgsInstance() { return new add_partitions_args(); } protected boolean isOneway() { return false; } public add_partitions_result getResult(I iface, add_partitions_args args) throws org.apache.thrift.TException { add_partitions_result result = new add_partitions_result(); try { result.success = iface.add_partitions(args.new_parts); result.setSuccessIsSet(true); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class add_partitions_pspec extends org.apache.thrift.ProcessFunction { public add_partitions_pspec() { super("add_partitions_pspec"); } public add_partitions_pspec_args getEmptyArgsInstance() { return new add_partitions_pspec_args(); } protected boolean isOneway() { return false; } public add_partitions_pspec_result getResult(I iface, add_partitions_pspec_args args) throws org.apache.thrift.TException { add_partitions_pspec_result result = new add_partitions_pspec_result(); try { result.success = iface.add_partitions_pspec(args.new_parts); result.setSuccessIsSet(true); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class append_partition extends org.apache.thrift.ProcessFunction { public append_partition() { super("append_partition"); } public append_partition_args getEmptyArgsInstance() { return new append_partition_args(); } protected boolean isOneway() { return false; } public append_partition_result getResult(I iface, append_partition_args args) throws org.apache.thrift.TException { append_partition_result result = new append_partition_result(); try { result.success = iface.append_partition(args.db_name, args.tbl_name, args.part_vals); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class add_partitions_req extends org.apache.thrift.ProcessFunction { public add_partitions_req() { super("add_partitions_req"); } public add_partitions_req_args getEmptyArgsInstance() { return new add_partitions_req_args(); } protected boolean isOneway() { return false; } public add_partitions_req_result getResult(I iface, add_partitions_req_args args) throws org.apache.thrift.TException { add_partitions_req_result result = new add_partitions_req_result(); try { result.success = iface.add_partitions_req(args.request); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class append_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public append_partition_with_environment_context() { super("append_partition_with_environment_context"); } public append_partition_with_environment_context_args getEmptyArgsInstance() { return new append_partition_with_environment_context_args(); } protected boolean isOneway() { return false; } public append_partition_with_environment_context_result getResult(I iface, append_partition_with_environment_context_args args) throws org.apache.thrift.TException { append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); try { result.success = iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class append_partition_by_name extends org.apache.thrift.ProcessFunction { public append_partition_by_name() { super("append_partition_by_name"); } public append_partition_by_name_args getEmptyArgsInstance() { return new append_partition_by_name_args(); } protected boolean isOneway() { return false; } public append_partition_by_name_result getResult(I iface, append_partition_by_name_args args) throws org.apache.thrift.TException { append_partition_by_name_result result = new append_partition_by_name_result(); try { result.success = iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class append_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { public append_partition_by_name_with_environment_context() { super("append_partition_by_name_with_environment_context"); } public append_partition_by_name_with_environment_context_args getEmptyArgsInstance() { return new append_partition_by_name_with_environment_context_args(); } protected boolean isOneway() { return false; } public append_partition_by_name_with_environment_context_result getResult(I iface, append_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); try { result.success = iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class drop_partition extends org.apache.thrift.ProcessFunction { public drop_partition() { super("drop_partition"); } public drop_partition_args getEmptyArgsInstance() { return new drop_partition_args(); } protected boolean isOneway() { return false; } public drop_partition_result getResult(I iface, drop_partition_args args) throws org.apache.thrift.TException { drop_partition_result result = new drop_partition_result(); try { result.success = iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public drop_partition_with_environment_context() { super("drop_partition_with_environment_context"); } public drop_partition_with_environment_context_args getEmptyArgsInstance() { return new drop_partition_with_environment_context_args(); } protected boolean isOneway() { return false; } public drop_partition_with_environment_context_result getResult(I iface, drop_partition_with_environment_context_args args) throws org.apache.thrift.TException { drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); try { result.success = iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { public drop_partition_by_name() { super("drop_partition_by_name"); } public drop_partition_by_name_args getEmptyArgsInstance() { return new drop_partition_by_name_args(); } protected boolean isOneway() { return false; } public drop_partition_by_name_result getResult(I iface, drop_partition_by_name_args args) throws org.apache.thrift.TException { drop_partition_by_name_result result = new drop_partition_by_name_result(); try { result.success = iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { public drop_partition_by_name_with_environment_context() { super("drop_partition_by_name_with_environment_context"); } public drop_partition_by_name_with_environment_context_args getEmptyArgsInstance() { return new drop_partition_by_name_with_environment_context_args(); } protected boolean isOneway() { return false; } public drop_partition_by_name_with_environment_context_result getResult(I iface, drop_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); try { result.success = iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_partitions_req extends org.apache.thrift.ProcessFunction { public drop_partitions_req() { super("drop_partitions_req"); } public drop_partitions_req_args getEmptyArgsInstance() { return new drop_partitions_req_args(); } protected boolean isOneway() { return false; } public drop_partitions_req_result getResult(I iface, drop_partitions_req_args args) throws org.apache.thrift.TException { drop_partitions_req_result result = new drop_partitions_req_result(); try { result.success = iface.drop_partitions_req(args.req); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partition extends org.apache.thrift.ProcessFunction { public get_partition() { super("get_partition"); } public get_partition_args getEmptyArgsInstance() { return new get_partition_args(); } protected boolean isOneway() { return false; } public get_partition_result getResult(I iface, get_partition_args args) throws org.apache.thrift.TException { get_partition_result result = new get_partition_result(); try { result.success = iface.get_partition(args.db_name, args.tbl_name, args.part_vals); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class exchange_partition extends org.apache.thrift.ProcessFunction { public exchange_partition() { super("exchange_partition"); } public exchange_partition_args getEmptyArgsInstance() { return new exchange_partition_args(); } protected boolean isOneway() { return false; } public exchange_partition_result getResult(I iface, exchange_partition_args args) throws org.apache.thrift.TException { exchange_partition_result result = new exchange_partition_result(); try { result.success = iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } catch (InvalidObjectException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { public get_partition_with_auth() { super("get_partition_with_auth"); } public get_partition_with_auth_args getEmptyArgsInstance() { return new get_partition_with_auth_args(); } protected boolean isOneway() { return false; } public get_partition_with_auth_result getResult(I iface, get_partition_with_auth_args args) throws org.apache.thrift.TException { get_partition_with_auth_result result = new get_partition_with_auth_result(); try { result.success = iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partition_by_name extends org.apache.thrift.ProcessFunction { public get_partition_by_name() { super("get_partition_by_name"); } public get_partition_by_name_args getEmptyArgsInstance() { return new get_partition_by_name_args(); } protected boolean isOneway() { return false; } public get_partition_by_name_result getResult(I iface, get_partition_by_name_args args) throws org.apache.thrift.TException { get_partition_by_name_result result = new get_partition_by_name_result(); try { result.success = iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions extends org.apache.thrift.ProcessFunction { public get_partitions() { super("get_partitions"); } public get_partitions_args getEmptyArgsInstance() { return new get_partitions_args(); } protected boolean isOneway() { return false; } public get_partitions_result getResult(I iface, get_partitions_args args) throws org.apache.thrift.TException { get_partitions_result result = new get_partitions_result(); try { result.success = iface.get_partitions(args.db_name, args.tbl_name, args.max_parts); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_with_auth() { super("get_partitions_with_auth"); } public get_partitions_with_auth_args getEmptyArgsInstance() { return new get_partitions_with_auth_args(); } protected boolean isOneway() { return false; } public get_partitions_with_auth_result getResult(I iface, get_partitions_with_auth_args args) throws org.apache.thrift.TException { get_partitions_with_auth_result result = new get_partitions_with_auth_result(); try { result.success = iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partitions_pspec extends org.apache.thrift.ProcessFunction { public get_partitions_pspec() { super("get_partitions_pspec"); } public get_partitions_pspec_args getEmptyArgsInstance() { return new get_partitions_pspec_args(); } protected boolean isOneway() { return false; } public get_partitions_pspec_result getResult(I iface, get_partitions_pspec_args args) throws org.apache.thrift.TException { get_partitions_pspec_result result = new get_partitions_pspec_result(); try { result.success = iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partition_names extends org.apache.thrift.ProcessFunction { public get_partition_names() { super("get_partition_names"); } public get_partition_names_args getEmptyArgsInstance() { return new get_partition_names_args(); } protected boolean isOneway() { return false; } public get_partition_names_result getResult(I iface, get_partition_names_args args) throws org.apache.thrift.TException { get_partition_names_result result = new get_partition_names_result(); try { result.success = iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts); } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partitions_ps extends org.apache.thrift.ProcessFunction { public get_partitions_ps() { super("get_partitions_ps"); } public get_partitions_ps_args getEmptyArgsInstance() { return new get_partitions_ps_args(); } protected boolean isOneway() { return false; } public get_partitions_ps_result getResult(I iface, get_partitions_ps_args args) throws org.apache.thrift.TException { get_partitions_ps_result result = new get_partitions_ps_result(); try { result.success = iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions_ps_with_auth extends org.apache.thrift.ProcessFunction { public get_partitions_ps_with_auth() { super("get_partitions_ps_with_auth"); } public get_partitions_ps_with_auth_args getEmptyArgsInstance() { return new get_partitions_ps_with_auth_args(); } protected boolean isOneway() { return false; } public get_partitions_ps_with_auth_result getResult(I iface, get_partitions_ps_with_auth_args args) throws org.apache.thrift.TException { get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); try { result.success = iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { public get_partition_names_ps() { super("get_partition_names_ps"); } public get_partition_names_ps_args getEmptyArgsInstance() { return new get_partition_names_ps_args(); } protected boolean isOneway() { return false; } public get_partition_names_ps_result getResult(I iface, get_partition_names_ps_args args) throws org.apache.thrift.TException { get_partition_names_ps_result result = new get_partition_names_ps_result(); try { result.success = iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { public get_partitions_by_filter() { super("get_partitions_by_filter"); } public get_partitions_by_filter_args getEmptyArgsInstance() { return new get_partitions_by_filter_args(); } protected boolean isOneway() { return false; } public get_partitions_by_filter_result getResult(I iface, get_partitions_by_filter_args args) throws org.apache.thrift.TException { get_partitions_by_filter_result result = new get_partitions_by_filter_result(); try { result.success = iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_part_specs_by_filter extends org.apache.thrift.ProcessFunction { public get_part_specs_by_filter() { super("get_part_specs_by_filter"); } public get_part_specs_by_filter_args getEmptyArgsInstance() { return new get_part_specs_by_filter_args(); } protected boolean isOneway() { return false; } public get_part_specs_by_filter_result getResult(I iface, get_part_specs_by_filter_args args) throws org.apache.thrift.TException { get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); try { result.success = iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions_by_expr extends org.apache.thrift.ProcessFunction { public get_partitions_by_expr() { super("get_partitions_by_expr"); } public get_partitions_by_expr_args getEmptyArgsInstance() { return new get_partitions_by_expr_args(); } protected boolean isOneway() { return false; } public get_partitions_by_expr_result getResult(I iface, get_partitions_by_expr_args args) throws org.apache.thrift.TException { get_partitions_by_expr_result result = new get_partitions_by_expr_result(); try { result.success = iface.get_partitions_by_expr(args.req); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { public get_partitions_by_names() { super("get_partitions_by_names"); } public get_partitions_by_names_args getEmptyArgsInstance() { return new get_partitions_by_names_args(); } protected boolean isOneway() { return false; } public get_partitions_by_names_result getResult(I iface, get_partitions_by_names_args args) throws org.apache.thrift.TException { get_partitions_by_names_result result = new get_partitions_by_names_result(); try { result.success = iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class alter_partition extends org.apache.thrift.ProcessFunction { public alter_partition() { super("alter_partition"); } public alter_partition_args getEmptyArgsInstance() { return new alter_partition_args(); } protected boolean isOneway() { return false; } public alter_partition_result getResult(I iface, alter_partition_args args) throws org.apache.thrift.TException { alter_partition_result result = new alter_partition_result(); try { iface.alter_partition(args.db_name, args.tbl_name, args.new_part); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class alter_partitions extends org.apache.thrift.ProcessFunction { public alter_partitions() { super("alter_partitions"); } public alter_partitions_args getEmptyArgsInstance() { return new alter_partitions_args(); } protected boolean isOneway() { return false; } public alter_partitions_result getResult(I iface, alter_partitions_args args) throws org.apache.thrift.TException { alter_partitions_result result = new alter_partitions_result(); try { iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class alter_partition_with_environment_context extends org.apache.thrift.ProcessFunction { public alter_partition_with_environment_context() { super("alter_partition_with_environment_context"); } public alter_partition_with_environment_context_args getEmptyArgsInstance() { return new alter_partition_with_environment_context_args(); } protected boolean isOneway() { return false; } public alter_partition_with_environment_context_result getResult(I iface, alter_partition_with_environment_context_args args) throws org.apache.thrift.TException { alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); try { iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class rename_partition extends org.apache.thrift.ProcessFunction { public rename_partition() { super("rename_partition"); } public rename_partition_args getEmptyArgsInstance() { return new rename_partition_args(); } protected boolean isOneway() { return false; } public rename_partition_result getResult(I iface, rename_partition_args args) throws org.apache.thrift.TException { rename_partition_result result = new rename_partition_result(); try { iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class partition_name_has_valid_characters extends org.apache.thrift.ProcessFunction { public partition_name_has_valid_characters() { super("partition_name_has_valid_characters"); } public partition_name_has_valid_characters_args getEmptyArgsInstance() { return new partition_name_has_valid_characters_args(); } protected boolean isOneway() { return false; } public partition_name_has_valid_characters_result getResult(I iface, partition_name_has_valid_characters_args args) throws org.apache.thrift.TException { partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); try { result.success = iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_config_value extends org.apache.thrift.ProcessFunction { public get_config_value() { super("get_config_value"); } public get_config_value_args getEmptyArgsInstance() { return new get_config_value_args(); } protected boolean isOneway() { return false; } public get_config_value_result getResult(I iface, get_config_value_args args) throws org.apache.thrift.TException { get_config_value_result result = new get_config_value_result(); try { result.success = iface.get_config_value(args.name, args.defaultValue); } catch (ConfigValSecurityException o1) { result.o1 = o1; } return result; } } public static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { public partition_name_to_vals() { super("partition_name_to_vals"); } public partition_name_to_vals_args getEmptyArgsInstance() { return new partition_name_to_vals_args(); } protected boolean isOneway() { return false; } public partition_name_to_vals_result getResult(I iface, partition_name_to_vals_args args) throws org.apache.thrift.TException { partition_name_to_vals_result result = new partition_name_to_vals_result(); try { result.success = iface.partition_name_to_vals(args.part_name); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { public partition_name_to_spec() { super("partition_name_to_spec"); } public partition_name_to_spec_args getEmptyArgsInstance() { return new partition_name_to_spec_args(); } protected boolean isOneway() { return false; } public partition_name_to_spec_result getResult(I iface, partition_name_to_spec_args args) throws org.apache.thrift.TException { partition_name_to_spec_result result = new partition_name_to_spec_result(); try { result.success = iface.partition_name_to_spec(args.part_name); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { public markPartitionForEvent() { super("markPartitionForEvent"); } public markPartitionForEvent_args getEmptyArgsInstance() { return new markPartitionForEvent_args(); } protected boolean isOneway() { return false; } public markPartitionForEvent_result getResult(I iface, markPartitionForEvent_args args) throws org.apache.thrift.TException { markPartitionForEvent_result result = new markPartitionForEvent_result(); try { iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } catch (UnknownTableException o4) { result.o4 = o4; } catch (UnknownPartitionException o5) { result.o5 = o5; } catch (InvalidPartitionException o6) { result.o6 = o6; } return result; } } public static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { public isPartitionMarkedForEvent() { super("isPartitionMarkedForEvent"); } public isPartitionMarkedForEvent_args getEmptyArgsInstance() { return new isPartitionMarkedForEvent_args(); } protected boolean isOneway() { return false; } public isPartitionMarkedForEvent_result getResult(I iface, isPartitionMarkedForEvent_args args) throws org.apache.thrift.TException { isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); try { result.success = iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } catch (UnknownTableException o4) { result.o4 = o4; } catch (UnknownPartitionException o5) { result.o5 = o5; } catch (InvalidPartitionException o6) { result.o6 = o6; } return result; } } public static class add_index extends org.apache.thrift.ProcessFunction { public add_index() { super("add_index"); } public add_index_args getEmptyArgsInstance() { return new add_index_args(); } protected boolean isOneway() { return false; } public add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException { add_index_result result = new add_index_result(); try { result.success = iface.add_index(args.new_index, args.index_table); } catch (InvalidObjectException o1) { result.o1 = o1; } catch (AlreadyExistsException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class alter_index extends org.apache.thrift.ProcessFunction { public alter_index() { super("alter_index"); } public alter_index_args getEmptyArgsInstance() { return new alter_index_args(); } protected boolean isOneway() { return false; } public alter_index_result getResult(I iface, alter_index_args args) throws org.apache.thrift.TException { alter_index_result result = new alter_index_result(); try { iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_index_by_name extends org.apache.thrift.ProcessFunction { public drop_index_by_name() { super("drop_index_by_name"); } public drop_index_by_name_args getEmptyArgsInstance() { return new drop_index_by_name_args(); } protected boolean isOneway() { return false; } public drop_index_by_name_result getResult(I iface, drop_index_by_name_args args) throws org.apache.thrift.TException { drop_index_by_name_result result = new drop_index_by_name_result(); try { result.success = iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_index_by_name extends org.apache.thrift.ProcessFunction { public get_index_by_name() { super("get_index_by_name"); } public get_index_by_name_args getEmptyArgsInstance() { return new get_index_by_name_args(); } protected boolean isOneway() { return false; } public get_index_by_name_result getResult(I iface, get_index_by_name_args args) throws org.apache.thrift.TException { get_index_by_name_result result = new get_index_by_name_result(); try { result.success = iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_indexes extends org.apache.thrift.ProcessFunction { public get_indexes() { super("get_indexes"); } public get_indexes_args getEmptyArgsInstance() { return new get_indexes_args(); } protected boolean isOneway() { return false; } public get_indexes_result getResult(I iface, get_indexes_args args) throws org.apache.thrift.TException { get_indexes_result result = new get_indexes_result(); try { result.success = iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_index_names extends org.apache.thrift.ProcessFunction { public get_index_names() { super("get_index_names"); } public get_index_names_args getEmptyArgsInstance() { return new get_index_names_args(); } protected boolean isOneway() { return false; } public get_index_names_result getResult(I iface, get_index_names_args args) throws org.apache.thrift.TException { get_index_names_result result = new get_index_names_result(); try { result.success = iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes); } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { public update_table_column_statistics() { super("update_table_column_statistics"); } public update_table_column_statistics_args getEmptyArgsInstance() { return new update_table_column_statistics_args(); } protected boolean isOneway() { return false; } public update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { update_table_column_statistics_result result = new update_table_column_statistics_result(); try { result.success = iface.update_table_column_statistics(args.stats_obj); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { public update_partition_column_statistics() { super("update_partition_column_statistics"); } public update_partition_column_statistics_args getEmptyArgsInstance() { return new update_partition_column_statistics_args(); } protected boolean isOneway() { return false; } public update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { update_partition_column_statistics_result result = new update_partition_column_statistics_result(); try { result.success = iface.update_partition_column_statistics(args.stats_obj); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { public get_table_column_statistics() { super("get_table_column_statistics"); } public get_table_column_statistics_args getEmptyArgsInstance() { return new get_table_column_statistics_args(); } protected boolean isOneway() { return false; } public get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { get_table_column_statistics_result result = new get_table_column_statistics_result(); try { result.success = iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } catch (InvalidInputException o3) { result.o3 = o3; } catch (InvalidObjectException o4) { result.o4 = o4; } return result; } } public static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { public get_partition_column_statistics() { super("get_partition_column_statistics"); } public get_partition_column_statistics_args getEmptyArgsInstance() { return new get_partition_column_statistics_args(); } protected boolean isOneway() { return false; } public get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { get_partition_column_statistics_result result = new get_partition_column_statistics_result(); try { result.success = iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } catch (InvalidInputException o3) { result.o3 = o3; } catch (InvalidObjectException o4) { result.o4 = o4; } return result; } } public static class get_table_statistics_req extends org.apache.thrift.ProcessFunction { public get_table_statistics_req() { super("get_table_statistics_req"); } public get_table_statistics_req_args getEmptyArgsInstance() { return new get_table_statistics_req_args(); } protected boolean isOneway() { return false; } public get_table_statistics_req_result getResult(I iface, get_table_statistics_req_args args) throws org.apache.thrift.TException { get_table_statistics_req_result result = new get_table_statistics_req_result(); try { result.success = iface.get_table_statistics_req(args.request); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_partitions_statistics_req extends org.apache.thrift.ProcessFunction { public get_partitions_statistics_req() { super("get_partitions_statistics_req"); } public get_partitions_statistics_req_args getEmptyArgsInstance() { return new get_partitions_statistics_req_args(); } protected boolean isOneway() { return false; } public get_partitions_statistics_req_result getResult(I iface, get_partitions_statistics_req_args args) throws org.apache.thrift.TException { get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); try { result.success = iface.get_partitions_statistics_req(args.request); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_aggr_stats_for extends org.apache.thrift.ProcessFunction { public get_aggr_stats_for() { super("get_aggr_stats_for"); } public get_aggr_stats_for_args getEmptyArgsInstance() { return new get_aggr_stats_for_args(); } protected boolean isOneway() { return false; } public get_aggr_stats_for_result getResult(I iface, get_aggr_stats_for_args args) throws org.apache.thrift.TException { get_aggr_stats_for_result result = new get_aggr_stats_for_result(); try { result.success = iface.get_aggr_stats_for(args.request); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class set_aggr_stats_for extends org.apache.thrift.ProcessFunction { public set_aggr_stats_for() { super("set_aggr_stats_for"); } public set_aggr_stats_for_args getEmptyArgsInstance() { return new set_aggr_stats_for_args(); } protected boolean isOneway() { return false; } public set_aggr_stats_for_result getResult(I iface, set_aggr_stats_for_args args) throws org.apache.thrift.TException { set_aggr_stats_for_result result = new set_aggr_stats_for_result(); try { result.success = iface.set_aggr_stats_for(args.request); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { public delete_partition_column_statistics() { super("delete_partition_column_statistics"); } public delete_partition_column_statistics_args getEmptyArgsInstance() { return new delete_partition_column_statistics_args(); } protected boolean isOneway() { return false; } public delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); try { result.success = iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } catch (InvalidObjectException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { public delete_table_column_statistics() { super("delete_table_column_statistics"); } public delete_table_column_statistics_args getEmptyArgsInstance() { return new delete_table_column_statistics_args(); } protected boolean isOneway() { return false; } public delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { delete_table_column_statistics_result result = new delete_table_column_statistics_result(); try { result.success = iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } catch (InvalidObjectException o3) { result.o3 = o3; } catch (InvalidInputException o4) { result.o4 = o4; } return result; } } public static class create_function extends org.apache.thrift.ProcessFunction { public create_function() { super("create_function"); } public create_function_args getEmptyArgsInstance() { return new create_function_args(); } protected boolean isOneway() { return false; } public create_function_result getResult(I iface, create_function_args args) throws org.apache.thrift.TException { create_function_result result = new create_function_result(); try { iface.create_function(args.func); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { result.o2 = o2; } catch (MetaException o3) { result.o3 = o3; } catch (NoSuchObjectException o4) { result.o4 = o4; } return result; } } public static class drop_function extends org.apache.thrift.ProcessFunction { public drop_function() { super("drop_function"); } public drop_function_args getEmptyArgsInstance() { return new drop_function_args(); } protected boolean isOneway() { return false; } public drop_function_result getResult(I iface, drop_function_args args) throws org.apache.thrift.TException { drop_function_result result = new drop_function_result(); try { iface.drop_function(args.dbName, args.funcName); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class alter_function extends org.apache.thrift.ProcessFunction { public alter_function() { super("alter_function"); } public alter_function_args getEmptyArgsInstance() { return new alter_function_args(); } protected boolean isOneway() { return false; } public alter_function_result getResult(I iface, alter_function_args args) throws org.apache.thrift.TException { alter_function_result result = new alter_function_result(); try { iface.alter_function(args.dbName, args.funcName, args.newFunc); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class get_functions extends org.apache.thrift.ProcessFunction { public get_functions() { super("get_functions"); } public get_functions_args getEmptyArgsInstance() { return new get_functions_args(); } protected boolean isOneway() { return false; } public get_functions_result getResult(I iface, get_functions_args args) throws org.apache.thrift.TException { get_functions_result result = new get_functions_result(); try { result.success = iface.get_functions(args.dbName, args.pattern); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_function extends org.apache.thrift.ProcessFunction { public get_function() { super("get_function"); } public get_function_args getEmptyArgsInstance() { return new get_function_args(); } protected boolean isOneway() { return false; } public get_function_result getResult(I iface, get_function_args args) throws org.apache.thrift.TException { get_function_result result = new get_function_result(); try { result.success = iface.get_function(args.dbName, args.funcName); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class create_role extends org.apache.thrift.ProcessFunction { public create_role() { super("create_role"); } public create_role_args getEmptyArgsInstance() { return new create_role_args(); } protected boolean isOneway() { return false; } public create_role_result getResult(I iface, create_role_args args) throws org.apache.thrift.TException { create_role_result result = new create_role_result(); try { result.success = iface.create_role(args.role); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class drop_role extends org.apache.thrift.ProcessFunction { public drop_role() { super("drop_role"); } public drop_role_args getEmptyArgsInstance() { return new drop_role_args(); } protected boolean isOneway() { return false; } public drop_role_result getResult(I iface, drop_role_args args) throws org.apache.thrift.TException { drop_role_result result = new drop_role_result(); try { result.success = iface.drop_role(args.role_name); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_role_names extends org.apache.thrift.ProcessFunction { public get_role_names() { super("get_role_names"); } public get_role_names_args getEmptyArgsInstance() { return new get_role_names_args(); } protected boolean isOneway() { return false; } public get_role_names_result getResult(I iface, get_role_names_args args) throws org.apache.thrift.TException { get_role_names_result result = new get_role_names_result(); try { result.success = iface.get_role_names(); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class grant_role extends org.apache.thrift.ProcessFunction { public grant_role() { super("grant_role"); } public grant_role_args getEmptyArgsInstance() { return new grant_role_args(); } protected boolean isOneway() { return false; } public grant_role_result getResult(I iface, grant_role_args args) throws org.apache.thrift.TException { grant_role_result result = new grant_role_result(); try { result.success = iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class revoke_role extends org.apache.thrift.ProcessFunction { public revoke_role() { super("revoke_role"); } public revoke_role_args getEmptyArgsInstance() { return new revoke_role_args(); } protected boolean isOneway() { return false; } public revoke_role_result getResult(I iface, revoke_role_args args) throws org.apache.thrift.TException { revoke_role_result result = new revoke_role_result(); try { result.success = iface.revoke_role(args.role_name, args.principal_name, args.principal_type); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class list_roles extends org.apache.thrift.ProcessFunction { public list_roles() { super("list_roles"); } public list_roles_args getEmptyArgsInstance() { return new list_roles_args(); } protected boolean isOneway() { return false; } public list_roles_result getResult(I iface, list_roles_args args) throws org.apache.thrift.TException { list_roles_result result = new list_roles_result(); try { result.success = iface.list_roles(args.principal_name, args.principal_type); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class grant_revoke_role extends org.apache.thrift.ProcessFunction { public grant_revoke_role() { super("grant_revoke_role"); } public grant_revoke_role_args getEmptyArgsInstance() { return new grant_revoke_role_args(); } protected boolean isOneway() { return false; } public grant_revoke_role_result getResult(I iface, grant_revoke_role_args args) throws org.apache.thrift.TException { grant_revoke_role_result result = new grant_revoke_role_result(); try { result.success = iface.grant_revoke_role(args.request); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_principals_in_role extends org.apache.thrift.ProcessFunction { public get_principals_in_role() { super("get_principals_in_role"); } public get_principals_in_role_args getEmptyArgsInstance() { return new get_principals_in_role_args(); } protected boolean isOneway() { return false; } public get_principals_in_role_result getResult(I iface, get_principals_in_role_args args) throws org.apache.thrift.TException { get_principals_in_role_result result = new get_principals_in_role_result(); try { result.success = iface.get_principals_in_role(args.request); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_role_grants_for_principal extends org.apache.thrift.ProcessFunction { public get_role_grants_for_principal() { super("get_role_grants_for_principal"); } public get_role_grants_for_principal_args getEmptyArgsInstance() { return new get_role_grants_for_principal_args(); } protected boolean isOneway() { return false; } public get_role_grants_for_principal_result getResult(I iface, get_role_grants_for_principal_args args) throws org.apache.thrift.TException { get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); try { result.success = iface.get_role_grants_for_principal(args.request); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_privilege_set extends org.apache.thrift.ProcessFunction { public get_privilege_set() { super("get_privilege_set"); } public get_privilege_set_args getEmptyArgsInstance() { return new get_privilege_set_args(); } protected boolean isOneway() { return false; } public get_privilege_set_result getResult(I iface, get_privilege_set_args args) throws org.apache.thrift.TException { get_privilege_set_result result = new get_privilege_set_result(); try { result.success = iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class list_privileges extends org.apache.thrift.ProcessFunction { public list_privileges() { super("list_privileges"); } public list_privileges_args getEmptyArgsInstance() { return new list_privileges_args(); } protected boolean isOneway() { return false; } public list_privileges_result getResult(I iface, list_privileges_args args) throws org.apache.thrift.TException { list_privileges_result result = new list_privileges_result(); try { result.success = iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class grant_privileges extends org.apache.thrift.ProcessFunction { public grant_privileges() { super("grant_privileges"); } public grant_privileges_args getEmptyArgsInstance() { return new grant_privileges_args(); } protected boolean isOneway() { return false; } public grant_privileges_result getResult(I iface, grant_privileges_args args) throws org.apache.thrift.TException { grant_privileges_result result = new grant_privileges_result(); try { result.success = iface.grant_privileges(args.privileges); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class revoke_privileges extends org.apache.thrift.ProcessFunction { public revoke_privileges() { super("revoke_privileges"); } public revoke_privileges_args getEmptyArgsInstance() { return new revoke_privileges_args(); } protected boolean isOneway() { return false; } public revoke_privileges_result getResult(I iface, revoke_privileges_args args) throws org.apache.thrift.TException { revoke_privileges_result result = new revoke_privileges_result(); try { result.success = iface.revoke_privileges(args.privileges); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class grant_revoke_privileges extends org.apache.thrift.ProcessFunction { public grant_revoke_privileges() { super("grant_revoke_privileges"); } public grant_revoke_privileges_args getEmptyArgsInstance() { return new grant_revoke_privileges_args(); } protected boolean isOneway() { return false; } public grant_revoke_privileges_result getResult(I iface, grant_revoke_privileges_args args) throws org.apache.thrift.TException { grant_revoke_privileges_result result = new grant_revoke_privileges_result(); try { result.success = iface.grant_revoke_privileges(args.request); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class set_ugi extends org.apache.thrift.ProcessFunction { public set_ugi() { super("set_ugi"); } public set_ugi_args getEmptyArgsInstance() { return new set_ugi_args(); } protected boolean isOneway() { return false; } public set_ugi_result getResult(I iface, set_ugi_args args) throws org.apache.thrift.TException { set_ugi_result result = new set_ugi_result(); try { result.success = iface.set_ugi(args.user_name, args.group_names); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_delegation_token extends org.apache.thrift.ProcessFunction { public get_delegation_token() { super("get_delegation_token"); } public get_delegation_token_args getEmptyArgsInstance() { return new get_delegation_token_args(); } protected boolean isOneway() { return false; } public get_delegation_token_result getResult(I iface, get_delegation_token_args args) throws org.apache.thrift.TException { get_delegation_token_result result = new get_delegation_token_result(); try { result.success = iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class renew_delegation_token extends org.apache.thrift.ProcessFunction { public renew_delegation_token() { super("renew_delegation_token"); } public renew_delegation_token_args getEmptyArgsInstance() { return new renew_delegation_token_args(); } protected boolean isOneway() { return false; } public renew_delegation_token_result getResult(I iface, renew_delegation_token_args args) throws org.apache.thrift.TException { renew_delegation_token_result result = new renew_delegation_token_result(); try { result.success = iface.renew_delegation_token(args.token_str_form); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { public cancel_delegation_token() { super("cancel_delegation_token"); } public cancel_delegation_token_args getEmptyArgsInstance() { return new cancel_delegation_token_args(); } protected boolean isOneway() { return false; } public cancel_delegation_token_result getResult(I iface, cancel_delegation_token_args args) throws org.apache.thrift.TException { cancel_delegation_token_result result = new cancel_delegation_token_result(); try { iface.cancel_delegation_token(args.token_str_form); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_open_txns extends org.apache.thrift.ProcessFunction { public get_open_txns() { super("get_open_txns"); } public get_open_txns_args getEmptyArgsInstance() { return new get_open_txns_args(); } protected boolean isOneway() { return false; } public get_open_txns_result getResult(I iface, get_open_txns_args args) throws org.apache.thrift.TException { get_open_txns_result result = new get_open_txns_result(); result.success = iface.get_open_txns(); return result; } } public static class get_open_txns_info extends org.apache.thrift.ProcessFunction { public get_open_txns_info() { super("get_open_txns_info"); } public get_open_txns_info_args getEmptyArgsInstance() { return new get_open_txns_info_args(); } protected boolean isOneway() { return false; } public get_open_txns_info_result getResult(I iface, get_open_txns_info_args args) throws org.apache.thrift.TException { get_open_txns_info_result result = new get_open_txns_info_result(); result.success = iface.get_open_txns_info(); return result; } } public static class open_txns extends org.apache.thrift.ProcessFunction { public open_txns() { super("open_txns"); } public open_txns_args getEmptyArgsInstance() { return new open_txns_args(); } protected boolean isOneway() { return false; } public open_txns_result getResult(I iface, open_txns_args args) throws org.apache.thrift.TException { open_txns_result result = new open_txns_result(); result.success = iface.open_txns(args.rqst); return result; } } public static class abort_txn extends org.apache.thrift.ProcessFunction { public abort_txn() { super("abort_txn"); } public abort_txn_args getEmptyArgsInstance() { return new abort_txn_args(); } protected boolean isOneway() { return false; } public abort_txn_result getResult(I iface, abort_txn_args args) throws org.apache.thrift.TException { abort_txn_result result = new abort_txn_result(); try { iface.abort_txn(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } return result; } } public static class commit_txn extends org.apache.thrift.ProcessFunction { public commit_txn() { super("commit_txn"); } public commit_txn_args getEmptyArgsInstance() { return new commit_txn_args(); } protected boolean isOneway() { return false; } public commit_txn_result getResult(I iface, commit_txn_args args) throws org.apache.thrift.TException { commit_txn_result result = new commit_txn_result(); try { iface.commit_txn(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } catch (TxnAbortedException o2) { result.o2 = o2; } return result; } } public static class lock extends org.apache.thrift.ProcessFunction { public lock() { super("lock"); } public lock_args getEmptyArgsInstance() { return new lock_args(); } protected boolean isOneway() { return false; } public lock_result getResult(I iface, lock_args args) throws org.apache.thrift.TException { lock_result result = new lock_result(); try { result.success = iface.lock(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } catch (TxnAbortedException o2) { result.o2 = o2; } return result; } } public static class check_lock extends org.apache.thrift.ProcessFunction { public check_lock() { super("check_lock"); } public check_lock_args getEmptyArgsInstance() { return new check_lock_args(); } protected boolean isOneway() { return false; } public check_lock_result getResult(I iface, check_lock_args args) throws org.apache.thrift.TException { check_lock_result result = new check_lock_result(); try { result.success = iface.check_lock(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } catch (TxnAbortedException o2) { result.o2 = o2; } catch (NoSuchLockException o3) { result.o3 = o3; } return result; } } public static class unlock extends org.apache.thrift.ProcessFunction { public unlock() { super("unlock"); } public unlock_args getEmptyArgsInstance() { return new unlock_args(); } protected boolean isOneway() { return false; } public unlock_result getResult(I iface, unlock_args args) throws org.apache.thrift.TException { unlock_result result = new unlock_result(); try { iface.unlock(args.rqst); } catch (NoSuchLockException o1) { result.o1 = o1; } catch (TxnOpenException o2) { result.o2 = o2; } return result; } } public static class show_locks extends org.apache.thrift.ProcessFunction { public show_locks() { super("show_locks"); } public show_locks_args getEmptyArgsInstance() { return new show_locks_args(); } protected boolean isOneway() { return false; } public show_locks_result getResult(I iface, show_locks_args args) throws org.apache.thrift.TException { show_locks_result result = new show_locks_result(); result.success = iface.show_locks(args.rqst); return result; } } public static class heartbeat extends org.apache.thrift.ProcessFunction { public heartbeat() { super("heartbeat"); } public heartbeat_args getEmptyArgsInstance() { return new heartbeat_args(); } protected boolean isOneway() { return false; } public heartbeat_result getResult(I iface, heartbeat_args args) throws org.apache.thrift.TException { heartbeat_result result = new heartbeat_result(); try { iface.heartbeat(args.ids); } catch (NoSuchLockException o1) { result.o1 = o1; } catch (NoSuchTxnException o2) { result.o2 = o2; } catch (TxnAbortedException o3) { result.o3 = o3; } return result; } } public static class heartbeat_txn_range extends org.apache.thrift.ProcessFunction { public heartbeat_txn_range() { super("heartbeat_txn_range"); } public heartbeat_txn_range_args getEmptyArgsInstance() { return new heartbeat_txn_range_args(); } protected boolean isOneway() { return false; } public heartbeat_txn_range_result getResult(I iface, heartbeat_txn_range_args args) throws org.apache.thrift.TException { heartbeat_txn_range_result result = new heartbeat_txn_range_result(); result.success = iface.heartbeat_txn_range(args.txns); return result; } } public static class compact extends org.apache.thrift.ProcessFunction { public compact() { super("compact"); } public compact_args getEmptyArgsInstance() { return new compact_args(); } protected boolean isOneway() { return false; } public compact_result getResult(I iface, compact_args args) throws org.apache.thrift.TException { compact_result result = new compact_result(); iface.compact(args.rqst); return result; } } public static class show_compact extends org.apache.thrift.ProcessFunction { public show_compact() { super("show_compact"); } public show_compact_args getEmptyArgsInstance() { return new show_compact_args(); } protected boolean isOneway() { return false; } public show_compact_result getResult(I iface, show_compact_args args) throws org.apache.thrift.TException { show_compact_result result = new show_compact_result(); result.success = iface.show_compact(args.rqst); return result; } } public static class add_dynamic_partitions extends org.apache.thrift.ProcessFunction { public add_dynamic_partitions() { super("add_dynamic_partitions"); } public add_dynamic_partitions_args getEmptyArgsInstance() { return new add_dynamic_partitions_args(); } protected boolean isOneway() { return false; } public add_dynamic_partitions_result getResult(I iface, add_dynamic_partitions_args args) throws org.apache.thrift.TException { add_dynamic_partitions_result result = new add_dynamic_partitions_result(); try { iface.add_dynamic_partitions(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } catch (TxnAbortedException o2) { result.o2 = o2; } return result; } } public static class get_next_notification extends org.apache.thrift.ProcessFunction { public get_next_notification() { super("get_next_notification"); } public get_next_notification_args getEmptyArgsInstance() { return new get_next_notification_args(); } protected boolean isOneway() { return false; } public get_next_notification_result getResult(I iface, get_next_notification_args args) throws org.apache.thrift.TException { get_next_notification_result result = new get_next_notification_result(); result.success = iface.get_next_notification(args.rqst); return result; } } public static class get_current_notificationEventId extends org.apache.thrift.ProcessFunction { public get_current_notificationEventId() { super("get_current_notificationEventId"); } public get_current_notificationEventId_args getEmptyArgsInstance() { return new get_current_notificationEventId_args(); } protected boolean isOneway() { return false; } public get_current_notificationEventId_result getResult(I iface, get_current_notificationEventId_args args) throws org.apache.thrift.TException { get_current_notificationEventId_result result = new get_current_notificationEventId_result(); result.success = iface.get_current_notificationEventId(); return result; } } public static class fire_listener_event extends org.apache.thrift.ProcessFunction { public fire_listener_event() { super("fire_listener_event"); } public fire_listener_event_args getEmptyArgsInstance() { return new fire_listener_event_args(); } protected boolean isOneway() { return false; } public fire_listener_event_result getResult(I iface, fire_listener_event_args args) throws org.apache.thrift.TException { fire_listener_event_result result = new fire_listener_event_result(); result.success = iface.fire_listener_event(args.rqst); return result; } } } public static class getMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_args"); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getMetaConf_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getMetaConf_argsTupleSchemeFactory()); } private String key; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEY return KEY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMetaConf_args.class, metaDataMap); } public getMetaConf_args() { } public getMetaConf_args( String key) { this(); this.key = key; } /** * Performs a deep copy on other. */ public getMetaConf_args(getMetaConf_args other) { if (other.isSetKey()) { this.key = other.key; } } public getMetaConf_args deepCopy() { return new getMetaConf_args(this); } @Override public void clear() { this.key = null; } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case KEY: return isSetKey(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getMetaConf_args) return this.equals((getMetaConf_args)that); return false; } public boolean equals(getMetaConf_args that) { if (that == null) return false; boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); return builder.toHashCode(); } public int compareTo(getMetaConf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getMetaConf_args typedOther = (getMetaConf_args)other; lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getMetaConf_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getMetaConf_argsStandardSchemeFactory implements SchemeFactory { public getMetaConf_argsStandardScheme getScheme() { return new getMetaConf_argsStandardScheme(); } } private static class getMetaConf_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getMetaConf_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getMetaConf_argsTupleSchemeFactory implements SchemeFactory { public getMetaConf_argsTupleScheme getScheme() { return new getMetaConf_argsTupleScheme(); } } private static class getMetaConf_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetKey()) { oprot.writeString(struct.key); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } } } } public static class getMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getMetaConf_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getMetaConf_resultTupleSchemeFactory()); } private String success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(getMetaConf_result.class, metaDataMap); } public getMetaConf_result() { } public getMetaConf_result( String success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public getMetaConf_result(getMetaConf_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public getMetaConf_result deepCopy() { return new getMetaConf_result(this); } @Override public void clear() { this.success = null; this.o1 = 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getMetaConf_result) return this.equals((getMetaConf_result)that); return false; } public boolean equals(getMetaConf_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(getMetaConf_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getMetaConf_result typedOther = (getMetaConf_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getMetaConf_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getMetaConf_resultStandardSchemeFactory implements SchemeFactory { public getMetaConf_resultStandardScheme getScheme() { return new getMetaConf_resultStandardScheme(); } } private static class getMetaConf_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getMetaConf_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getMetaConf_resultTupleSchemeFactory implements SchemeFactory { public getMetaConf_resultTupleScheme getScheme() { return new getMetaConf_resultTupleScheme(); } } private static class getMetaConf_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getMetaConf_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class setMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_args"); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setMetaConf_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new setMetaConf_argsTupleSchemeFactory()); } private String key; // required private String value; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { KEY((short)1, "key"), VALUE((short)2, "value"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEY return KEY; case 2: // VALUE return VALUE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", 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(setMetaConf_args.class, metaDataMap); } public setMetaConf_args() { } public setMetaConf_args( String key, String value) { this(); this.key = key; this.value = value; } /** * Performs a deep copy on other. */ public setMetaConf_args(setMetaConf_args other) { if (other.isSetKey()) { this.key = other.key; } if (other.isSetValue()) { this.value = other.value; } } public setMetaConf_args deepCopy() { return new setMetaConf_args(this); } @Override public void clear() { this.key = null; this.value = null; } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public void unsetKey() { this.key = null; } /** Returns true if field key is set (has been assigned a value) and false otherwise */ public boolean isSetKey() { return this.key != null; } public void setKeyIsSet(boolean value) { if (!value) { this.key = null; } } public String getValue() { return this.value; } public void setValue(String value) { this.value = value; } public void unsetValue() { this.value = null; } /** Returns true if field value is set (has been assigned a value) and false otherwise */ public boolean isSetValue() { return this.value != null; } public void setValueIsSet(boolean value) { if (!value) { this.value = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; case VALUE: if (value == null) { unsetValue(); } else { setValue((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); case VALUE: return getValue(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case KEY: return isSetKey(); case VALUE: return isSetValue(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setMetaConf_args) return this.equals((setMetaConf_args)that); return false; } public boolean equals(setMetaConf_args that) { if (that == null) return false; boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); if (this_present_key || that_present_key) { if (!(this_present_key && that_present_key)) return false; if (!this.key.equals(that.key)) return false; } boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; if (!this.value.equals(that.value)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_key = true && (isSetKey()); builder.append(present_key); if (present_key) builder.append(key); boolean present_value = true && (isSetValue()); builder.append(present_value); if (present_value) builder.append(value); return builder.toHashCode(); } public int compareTo(setMetaConf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; setMetaConf_args typedOther = (setMetaConf_args)other; lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setMetaConf_args("); boolean first = true; sb.append("key:"); if (this.key == null) { sb.append("null"); } else { sb.append(this.key); } first = false; if (!first) sb.append(", "); sb.append("value:"); if (this.value == null) { sb.append("null"); } else { sb.append(this.value); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setMetaConf_argsStandardSchemeFactory implements SchemeFactory { public setMetaConf_argsStandardScheme getScheme() { return new setMetaConf_argsStandardScheme(); } } private static class setMetaConf_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readString(); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setMetaConf_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeString(struct.value); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setMetaConf_argsTupleSchemeFactory implements SchemeFactory { public setMetaConf_argsTupleScheme getScheme() { return new setMetaConf_argsTupleScheme(); } } private static class setMetaConf_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey()) { optionals.set(0); } if (struct.isSetValue()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetKey()) { oprot.writeString(struct.key); } if (struct.isSetValue()) { oprot.writeString(struct.value); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.value = iprot.readString(); struct.setValueIsSet(true); } } } } public static class setMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new setMetaConf_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new setMetaConf_resultTupleSchemeFactory()); } private MetaException o1; // 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 { O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(setMetaConf_result.class, metaDataMap); } public setMetaConf_result() { } public setMetaConf_result( MetaException o1) { this(); this.o1 = o1; } /** * Performs a deep copy on other. */ public setMetaConf_result(setMetaConf_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public setMetaConf_result deepCopy() { return new setMetaConf_result(this); } @Override public void clear() { this.o1 = null; } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof setMetaConf_result) return this.equals((setMetaConf_result)that); return false; } public boolean equals(setMetaConf_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(setMetaConf_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; setMetaConf_result typedOther = (setMetaConf_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("setMetaConf_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setMetaConf_resultStandardSchemeFactory implements SchemeFactory { public setMetaConf_resultStandardScheme getScheme() { return new setMetaConf_resultStandardScheme(); } } private static class setMetaConf_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, setMetaConf_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setMetaConf_resultTupleSchemeFactory implements SchemeFactory { public setMetaConf_resultTupleScheme getScheme() { return new setMetaConf_resultTupleScheme(); } } private static class setMetaConf_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class create_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_args"); private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_database_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_database_argsTupleSchemeFactory()); } private Database database; // 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 { DATABASE((short)1, "database"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DATABASE return DATABASE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); } public create_database_args() { } public create_database_args( Database database) { this(); this.database = database; } /** * Performs a deep copy on other. */ public create_database_args(create_database_args other) { if (other.isSetDatabase()) { this.database = new Database(other.database); } } public create_database_args deepCopy() { return new create_database_args(this); } @Override public void clear() { this.database = null; } public Database getDatabase() { return this.database; } public void setDatabase(Database database) { this.database = database; } public void unsetDatabase() { this.database = null; } /** Returns true if field database is set (has been assigned a value) and false otherwise */ public boolean isSetDatabase() { return this.database != null; } public void setDatabaseIsSet(boolean value) { if (!value) { this.database = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DATABASE: if (value == null) { unsetDatabase(); } else { setDatabase((Database)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DATABASE: return getDatabase(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DATABASE: return isSetDatabase(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_database_args) return this.equals((create_database_args)that); return false; } public boolean equals(create_database_args that) { if (that == null) return false; boolean this_present_database = true && this.isSetDatabase(); boolean that_present_database = true && that.isSetDatabase(); if (this_present_database || that_present_database) { if (!(this_present_database && that_present_database)) return false; if (!this.database.equals(that.database)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_database = true && (isSetDatabase()); builder.append(present_database); if (present_database) builder.append(database); return builder.toHashCode(); } public int compareTo(create_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_database_args typedOther = (create_database_args)other; lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, typedOther.database); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_database_args("); boolean first = true; sb.append("database:"); if (this.database == null) { sb.append("null"); } else { sb.append(this.database); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (database != null) { database.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_database_argsStandardSchemeFactory implements SchemeFactory { public create_database_argsStandardScheme getScheme() { return new create_database_argsStandardScheme(); } } private static class create_database_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DATABASE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.database = new Database(); struct.database.read(iprot); struct.setDatabaseIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.database != null) { oprot.writeFieldBegin(DATABASE_FIELD_DESC); struct.database.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_database_argsTupleSchemeFactory implements SchemeFactory { public create_database_argsTupleScheme getScheme() { return new create_database_argsTupleScheme(); } } private static class create_database_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDatabase()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetDatabase()) { struct.database.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_database_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.database = new Database(); struct.database.read(iprot); struct.setDatabaseIsSet(true); } } } } public static class create_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_database_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_database_resultTupleSchemeFactory()); } private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(create_database_result.class, metaDataMap); } public create_database_result() { } public create_database_result( AlreadyExistsException o1, InvalidObjectException o2, MetaException o3) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public create_database_result(create_database_result other) { if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public create_database_result deepCopy() { return new create_database_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_database_result) return this.equals((create_database_result)that); return false; } public boolean equals(create_database_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(create_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_database_result typedOther = (create_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_database_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_database_resultStandardSchemeFactory implements SchemeFactory { public create_database_resultStandardScheme getScheme() { return new create_database_resultStandardScheme(); } } private static class create_database_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_database_resultTupleSchemeFactory implements SchemeFactory { public create_database_resultTupleScheme getScheme() { return new create_database_resultTupleScheme(); } } private static class create_database_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_database_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_database_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_database_argsTupleSchemeFactory()); } 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 byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_database_args.class, metaDataMap); } public get_database_args() { } public get_database_args( String name) { this(); this.name = name; } /** * Performs a deep copy on other. */ public get_database_args(get_database_args other) { if (other.isSetName()) { this.name = other.name; } } public get_database_args deepCopy() { return new get_database_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 get_database_args) return this.equals((get_database_args)that); return false; } public boolean equals(get_database_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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); return builder.toHashCode(); } public int compareTo(get_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_database_args typedOther = (get_database_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_database_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 // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_database_argsStandardSchemeFactory implements SchemeFactory { public get_database_argsStandardScheme getScheme() { return new get_database_argsStandardScheme(); } } private static class get_database_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_database_argsTupleSchemeFactory implements SchemeFactory { public get_database_argsTupleScheme getScheme() { return new get_database_argsTupleScheme(); } } private static class get_database_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetName()) { oprot.writeString(struct.name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_database_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } } } } public static class get_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_database_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_database_resultTupleSchemeFactory()); } private Database success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Database.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); } public get_database_result() { } public get_database_result( Database success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_database_result(get_database_result other) { if (other.isSetSuccess()) { this.success = new Database(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_database_result deepCopy() { return new get_database_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Database getSuccess() { return this.success; } public void setSuccess(Database 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Database)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_database_result) return this.equals((get_database_result)that); return false; } public boolean equals(get_database_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_database_result typedOther = (get_database_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_database_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_database_resultStandardSchemeFactory implements SchemeFactory { public get_database_resultStandardScheme getScheme() { return new get_database_resultStandardScheme(); } } private static class get_database_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Database(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_database_resultTupleSchemeFactory implements SchemeFactory { public get_database_resultTupleScheme getScheme() { return new get_database_resultTupleScheme(); } } private static class get_database_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_database_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Database(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_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 DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_database_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_database_argsTupleSchemeFactory()); } private String name; // required private boolean deleteData; // required private boolean cascade; // 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"), DELETE_DATA((short)2, "deleteData"), CASCADE((short)3, "cascade"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DELETE_DATA return DELETE_DATA; case 3: // CASCADE return CASCADE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private static final int __CASCADE_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", 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(drop_database_args.class, metaDataMap); } public drop_database_args() { } public drop_database_args( String name, boolean deleteData, boolean cascade) { this(); this.name = name; this.deleteData = deleteData; setDeleteDataIsSet(true); this.cascade = cascade; setCascadeIsSet(true); } /** * Performs a deep copy on other. */ public drop_database_args(drop_database_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } this.deleteData = other.deleteData; this.cascade = other.cascade; } public drop_database_args deepCopy() { return new drop_database_args(this); } @Override public void clear() { this.name = null; setDeleteDataIsSet(false); this.deleteData = false; setCascadeIsSet(false); this.cascade = false; } 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 boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public boolean isCascade() { return this.cascade; } public void setCascade(boolean cascade) { this.cascade = cascade; setCascadeIsSet(true); } public void unsetCascade() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { return EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; case CASCADE: if (value == null) { unsetCascade(); } else { setCascade((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); case CASCADE: return Boolean.valueOf(isCascade()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DELETE_DATA: return isSetDeleteData(); case CASCADE: return isSetCascade(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_database_args) return this.equals((drop_database_args)that); return false; } public boolean equals(drop_database_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_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } boolean this_present_cascade = true; boolean that_present_cascade = true; if (this_present_cascade || that_present_cascade) { if (!(this_present_cascade && that_present_cascade)) return false; if (this.cascade != that.cascade) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); boolean present_cascade = true; builder.append(present_cascade); if (present_cascade) builder.append(cascade); return builder.toHashCode(); } public int compareTo(drop_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_database_args typedOther = (drop_database_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(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(typedOther.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, typedOther.cascade); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_database_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("deleteData:"); sb.append(this.deleteData); first = false; if (!first) sb.append(", "); sb.append("cascade:"); sb.append(this.cascade); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_database_argsStandardSchemeFactory implements SchemeFactory { public drop_database_argsStandardScheme getScheme() { return new drop_database_argsStandardScheme(); } } private static class drop_database_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // CASCADE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); oprot.writeFieldBegin(CASCADE_FIELD_DESC); oprot.writeBool(struct.cascade); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_database_argsTupleSchemeFactory implements SchemeFactory { public drop_database_argsTupleScheme getScheme() { return new drop_database_argsTupleScheme(); } } private static class drop_database_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetDeleteData()) { optionals.set(1); } if (struct.isSetCascade()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } if (struct.isSetCascade()) { oprot.writeBool(struct.cascade); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } if (incoming.get(2)) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } } } } public static class drop_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_database_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_database_resultTupleSchemeFactory()); } private NoSuchObjectException o1; // required private InvalidOperationException o2; // required private MetaException o3; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(drop_database_result.class, metaDataMap); } public drop_database_result() { } public drop_database_result( NoSuchObjectException o1, InvalidOperationException o2, MetaException o3) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public drop_database_result(drop_database_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidOperationException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public drop_database_result deepCopy() { return new drop_database_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidOperationException getO2() { return this.o2; } public void setO2(InvalidOperationException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidOperationException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_database_result) return this.equals((drop_database_result)that); return false; } public boolean equals(drop_database_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(drop_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_database_result typedOther = (drop_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_database_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_database_resultStandardSchemeFactory implements SchemeFactory { public drop_database_resultStandardScheme getScheme() { return new drop_database_resultStandardScheme(); } } private static class drop_database_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_database_resultTupleSchemeFactory implements SchemeFactory { public drop_database_resultTupleScheme getScheme() { return new drop_database_resultTupleScheme(); } } private static class drop_database_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_database_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_args"); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_databases_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_databases_argsTupleSchemeFactory()); } private String pattern; // 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 { PATTERN((short)1, "pattern"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PATTERN return PATTERN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); } public get_databases_args() { } public get_databases_args( String pattern) { this(); this.pattern = pattern; } /** * Performs a deep copy on other. */ public get_databases_args(get_databases_args other) { if (other.isSetPattern()) { this.pattern = other.pattern; } } public get_databases_args deepCopy() { return new get_databases_args(this); } @Override public void clear() { this.pattern = null; } public String getPattern() { return this.pattern; } public void setPattern(String pattern) { this.pattern = pattern; } public void unsetPattern() { this.pattern = null; } /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ public boolean isSetPattern() { return this.pattern != null; } public void setPatternIsSet(boolean value) { if (!value) { this.pattern = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATTERN: if (value == null) { unsetPattern(); } else { setPattern((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATTERN: return getPattern(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PATTERN: return isSetPattern(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_databases_args) return this.equals((get_databases_args)that); return false; } public boolean equals(get_databases_args that) { if (that == null) return false; boolean this_present_pattern = true && this.isSetPattern(); boolean that_present_pattern = true && that.isSetPattern(); if (this_present_pattern || that_present_pattern) { if (!(this_present_pattern && that_present_pattern)) return false; if (!this.pattern.equals(that.pattern)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_pattern = true && (isSetPattern()); builder.append(present_pattern); if (present_pattern) builder.append(pattern); return builder.toHashCode(); } public int compareTo(get_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_databases_args typedOther = (get_databases_args)other; lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_databases_args("); boolean first = true; sb.append("pattern:"); if (this.pattern == null) { sb.append("null"); } else { sb.append(this.pattern); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_databases_argsStandardSchemeFactory implements SchemeFactory { public get_databases_argsStandardScheme getScheme() { return new get_databases_argsStandardScheme(); } } private static class get_databases_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PATTERN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.pattern != null) { oprot.writeFieldBegin(PATTERN_FIELD_DESC); oprot.writeString(struct.pattern); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_databases_argsTupleSchemeFactory implements SchemeFactory { public get_databases_argsTupleScheme getScheme() { return new get_databases_argsTupleScheme(); } } private static class get_databases_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPattern()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPattern()) { oprot.writeString(struct.pattern); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } } } } public static class get_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_databases_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_databases_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); } public get_databases_result() { } public get_databases_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_databases_result(get_databases_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_databases_result deepCopy() { return new get_databases_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_databases_result) return this.equals((get_databases_result)that); return false; } public boolean equals(get_databases_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_databases_result typedOther = (get_databases_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_databases_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_databases_resultStandardSchemeFactory implements SchemeFactory { public get_databases_resultStandardScheme getScheme() { return new get_databases_resultStandardScheme(); } } private static class get_databases_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_databases_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list524 = iprot.readListBegin(); struct.success = new ArrayList(_list524.size); for (int _i525 = 0; _i525 < _list524.size; ++_i525) { String _elem526; // optional _elem526 = iprot.readString(); struct.success.add(_elem526); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_databases_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter527 : struct.success) { oprot.writeString(_iter527); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_databases_resultTupleSchemeFactory implements SchemeFactory { public get_databases_resultTupleScheme getScheme() { return new get_databases_resultTupleScheme(); } } private static class get_databases_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter528 : struct.success) { oprot.writeString(_iter528); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_databases_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list529 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list529.size); for (int _i530 = 0; _i530 < _list529.size; ++_i530) { String _elem531; // optional _elem531 = iprot.readString(); struct.success.add(_elem531); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_all_databases_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_databases_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_databases_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_all_databases_args.class, metaDataMap); } public get_all_databases_args() { } /** * Performs a deep copy on other. */ public get_all_databases_args(get_all_databases_args other) { } public get_all_databases_args deepCopy() { return new get_all_databases_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 get_all_databases_args) return this.equals((get_all_databases_args)that); return false; } public boolean equals(get_all_databases_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(get_all_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_databases_args typedOther = (get_all_databases_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_all_databases_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_databases_argsStandardSchemeFactory implements SchemeFactory { public get_all_databases_argsStandardScheme getScheme() { return new get_all_databases_argsStandardScheme(); } } private static class get_all_databases_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_databases_argsTupleSchemeFactory implements SchemeFactory { public get_all_databases_argsTupleScheme getScheme() { return new get_all_databases_argsTupleScheme(); } } private static class get_all_databases_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_all_databases_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_databases_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_databases_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); } public get_all_databases_result() { } public get_all_databases_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_all_databases_result(get_all_databases_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_all_databases_result deepCopy() { return new get_all_databases_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_all_databases_result) return this.equals((get_all_databases_result)that); return false; } public boolean equals(get_all_databases_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_all_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_databases_result typedOther = (get_all_databases_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_all_databases_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_databases_resultStandardSchemeFactory implements SchemeFactory { public get_all_databases_resultStandardScheme getScheme() { return new get_all_databases_resultStandardScheme(); } } private static class get_all_databases_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_databases_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list532 = iprot.readListBegin(); struct.success = new ArrayList(_list532.size); for (int _i533 = 0; _i533 < _list532.size; ++_i533) { String _elem534; // optional _elem534 = iprot.readString(); struct.success.add(_elem534); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_databases_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter535 : struct.success) { oprot.writeString(_iter535); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_databases_resultTupleSchemeFactory implements SchemeFactory { public get_all_databases_resultTupleScheme getScheme() { return new get_all_databases_resultTupleScheme(); } } private static class get_all_databases_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter536 : struct.success) { oprot.writeString(_iter536); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_databases_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list537 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list537.size); for (int _i538 = 0; _i538 < _list537.size; ++_i538) { String _elem539; // optional _elem539 = iprot.readString(); struct.success.add(_elem539); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class alter_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_database_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_database_argsTupleSchemeFactory()); } private String dbname; // required private Database db; // 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 { DBNAME((short)1, "dbname"), DB((short)2, "db"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // DB return DB; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_database_args.class, metaDataMap); } public alter_database_args() { } public alter_database_args( String dbname, Database db) { this(); this.dbname = dbname; this.db = db; } /** * Performs a deep copy on other. */ public alter_database_args(alter_database_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetDb()) { this.db = new Database(other.db); } } public alter_database_args deepCopy() { return new alter_database_args(this); } @Override public void clear() { this.dbname = null; this.db = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public Database getDb() { return this.db; } public void setDb(Database db) { this.db = db; } public void unsetDb() { this.db = null; } /** Returns true if field db is set (has been assigned a value) and false otherwise */ public boolean isSetDb() { return this.db != null; } public void setDbIsSet(boolean value) { if (!value) { this.db = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case DB: if (value == null) { unsetDb(); } else { setDb((Database)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case DB: return getDb(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case DB: return isSetDb(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_database_args) return this.equals((alter_database_args)that); return false; } public boolean equals(alter_database_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_db = true && this.isSetDb(); boolean that_present_db = true && that.isSetDb(); if (this_present_db || that_present_db) { if (!(this_present_db && that_present_db)) return false; if (!this.db.equals(that.db)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_db = true && (isSetDb()); builder.append(present_db); if (present_db) builder.append(db); return builder.toHashCode(); } public int compareTo(alter_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_database_args typedOther = (alter_database_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDb()).compareTo(typedOther.isSetDb()); if (lastComparison != 0) { return lastComparison; } if (isSetDb()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, typedOther.db); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_database_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("db:"); if (this.db == null) { sb.append("null"); } else { sb.append(this.db); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (db != null) { db.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_database_argsStandardSchemeFactory implements SchemeFactory { public alter_database_argsStandardScheme getScheme() { return new alter_database_argsStandardScheme(); } } private static class alter_database_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DB if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.db = new Database(); struct.db.read(iprot); struct.setDbIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.db != null) { oprot.writeFieldBegin(DB_FIELD_DESC); struct.db.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_database_argsTupleSchemeFactory implements SchemeFactory { public alter_database_argsTupleScheme getScheme() { return new alter_database_argsTupleScheme(); } } private static class alter_database_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetDb()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetDb()) { struct.db.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.db = new Database(); struct.db.read(iprot); struct.setDbIsSet(true); } } } } public static class alter_database_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_database_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_database_resultTupleSchemeFactory()); } private MetaException o1; // required private NoSuchObjectException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_database_result.class, metaDataMap); } public alter_database_result() { } public alter_database_result( MetaException o1, NoSuchObjectException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_database_result(alter_database_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public alter_database_result deepCopy() { return new alter_database_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_database_result) return this.equals((alter_database_result)that); return false; } public boolean equals(alter_database_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_database_result typedOther = (alter_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_database_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_database_resultStandardSchemeFactory implements SchemeFactory { public alter_database_resultStandardScheme getScheme() { return new alter_database_resultStandardScheme(); } } private static class alter_database_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_database_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_database_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_database_resultTupleSchemeFactory implements SchemeFactory { public alter_database_resultTupleScheme getScheme() { return new alter_database_resultTupleScheme(); } } private static class alter_database_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_database_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_type_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_type_argsTupleSchemeFactory()); } 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 byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_type_args.class, metaDataMap); } public get_type_args() { } public get_type_args( String name) { this(); this.name = name; } /** * Performs a deep copy on other. */ public get_type_args(get_type_args other) { if (other.isSetName()) { this.name = other.name; } } public get_type_args deepCopy() { return new get_type_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 get_type_args) return this.equals((get_type_args)that); return false; } public boolean equals(get_type_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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); return builder.toHashCode(); } public int compareTo(get_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_args typedOther = (get_type_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_type_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 // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_type_argsStandardSchemeFactory implements SchemeFactory { public get_type_argsStandardScheme getScheme() { return new get_type_argsStandardScheme(); } } private static class get_type_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_type_argsTupleSchemeFactory implements SchemeFactory { public get_type_argsTupleScheme getScheme() { return new get_type_argsTupleScheme(); } } private static class get_type_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetName()) { oprot.writeString(struct.name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_type_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } } } } public static class get_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_type_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_type_resultTupleSchemeFactory()); } private Type success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Type.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); } public get_type_result() { } public get_type_result( Type success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_type_result(get_type_result other) { if (other.isSetSuccess()) { this.success = new Type(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_type_result deepCopy() { return new get_type_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Type getSuccess() { return this.success; } public void setSuccess(Type 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Type)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_type_result) return this.equals((get_type_result)that); return false; } public boolean equals(get_type_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_result typedOther = (get_type_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_type_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_type_resultStandardSchemeFactory implements SchemeFactory { public get_type_resultStandardScheme getScheme() { return new get_type_resultStandardScheme(); } } private static class get_type_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Type(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_type_resultTupleSchemeFactory implements SchemeFactory { public get_type_resultTupleScheme getScheme() { return new get_type_resultTupleScheme(); } } private static class get_type_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_type_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Type(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class create_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_type_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_type_argsTupleSchemeFactory()); } private Type type; // 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 { TYPE((short)1, "type"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // TYPE return 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); } public create_type_args() { } public create_type_args( Type type) { this(); this.type = type; } /** * Performs a deep copy on other. */ public create_type_args(create_type_args other) { if (other.isSetType()) { this.type = new Type(other.type); } } public create_type_args deepCopy() { return new create_type_args(this); } @Override public void clear() { this.type = null; } public Type getType() { return this.type; } public void setType(Type type) { this.type = type; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((Type)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 TYPE: return isSetType(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_type_args) return this.equals((create_type_args)that); return false; } public boolean equals(create_type_args that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_type = true && (isSetType()); builder.append(present_type); if (present_type) builder.append(type); return builder.toHashCode(); } public int compareTo(create_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_type_args typedOther = (create_type_args)other; lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_type_args("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (type != null) { type.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_type_argsStandardSchemeFactory implements SchemeFactory { public create_type_argsStandardScheme getScheme() { return new create_type_argsStandardScheme(); } } private static class create_type_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.type = new Type(); struct.type.read(iprot); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); struct.type.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_type_argsTupleSchemeFactory implements SchemeFactory { public create_type_argsTupleScheme getScheme() { return new create_type_argsTupleScheme(); } } private static class create_type_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetType()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetType()) { struct.type.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_type_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.type = new Type(); struct.type.read(iprot); struct.setTypeIsSet(true); } } } } public static class create_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_type_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_type_resultTupleSchemeFactory()); } private boolean success; // required private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(create_type_result.class, metaDataMap); } public create_type_result() { } public create_type_result( boolean success, AlreadyExistsException o1, InvalidObjectException o2, MetaException o3) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public create_type_result(create_type_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public create_type_result deepCopy() { return new create_type_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_type_result) return this.equals((create_type_result)that); return false; } public boolean equals(create_type_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(create_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_type_result typedOther = (create_type_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_type_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_type_resultStandardSchemeFactory implements SchemeFactory { public create_type_resultStandardScheme getScheme() { return new create_type_resultStandardScheme(); } } private static class create_type_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_type_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_type_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_type_resultTupleSchemeFactory implements SchemeFactory { public create_type_resultTupleScheme getScheme() { return new create_type_resultTupleScheme(); } } private static class create_type_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_type_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class drop_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_type_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_type_argsTupleSchemeFactory()); } private String type; // 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 { TYPE((short)1, "type"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // TYPE return 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", 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(drop_type_args.class, metaDataMap); } public drop_type_args() { } public drop_type_args( String type) { this(); this.type = type; } /** * Performs a deep copy on other. */ public drop_type_args(drop_type_args other) { if (other.isSetType()) { this.type = other.type; } } public drop_type_args deepCopy() { return new drop_type_args(this); } @Override public void clear() { this.type = null; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 TYPE: return isSetType(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_type_args) return this.equals((drop_type_args)that); return false; } public boolean equals(drop_type_args that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_type = true && (isSetType()); builder.append(present_type); if (present_type) builder.append(type); return builder.toHashCode(); } public int compareTo(drop_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_type_args typedOther = (drop_type_args)other; lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_type_args("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_type_argsStandardSchemeFactory implements SchemeFactory { public drop_type_argsStandardScheme getScheme() { return new drop_type_argsStandardScheme(); } } private static class drop_type_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.type = iprot.readString(); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeString(struct.type); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_type_argsTupleSchemeFactory implements SchemeFactory { public drop_type_argsTupleScheme getScheme() { return new drop_type_argsTupleScheme(); } } private static class drop_type_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetType()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetType()) { oprot.writeString(struct.type); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.type = iprot.readString(); struct.setTypeIsSet(true); } } } } public static class drop_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_type_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_type_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_type_result.class, metaDataMap); } public drop_type_result() { } public drop_type_result( boolean success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_type_result(drop_type_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public drop_type_result deepCopy() { return new drop_type_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_type_result) return this.equals((drop_type_result)that); return false; } public boolean equals(drop_type_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_type_result typedOther = (drop_type_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_type_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_type_resultStandardSchemeFactory implements SchemeFactory { public drop_type_resultStandardScheme getScheme() { return new drop_type_resultStandardScheme(); } } private static class drop_type_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_type_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_type_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_type_resultTupleSchemeFactory implements SchemeFactory { public drop_type_resultTupleScheme getScheme() { return new drop_type_resultTupleScheme(); } } private static class drop_type_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_type_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_type_all_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_type_all_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_type_all_argsTupleSchemeFactory()); } 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 byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_type_all_args.class, metaDataMap); } public get_type_all_args() { } public get_type_all_args( String name) { this(); this.name = name; } /** * Performs a deep copy on other. */ public get_type_all_args(get_type_all_args other) { if (other.isSetName()) { this.name = other.name; } } public get_type_all_args deepCopy() { return new get_type_all_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 get_type_all_args) return this.equals((get_type_all_args)that); return false; } public boolean equals(get_type_all_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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); return builder.toHashCode(); } public int compareTo(get_type_all_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_all_args typedOther = (get_type_all_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_type_all_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 // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_type_all_argsStandardSchemeFactory implements SchemeFactory { public get_type_all_argsStandardScheme getScheme() { return new get_type_all_argsStandardScheme(); } } private static class get_type_all_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_type_all_argsTupleSchemeFactory implements SchemeFactory { public get_type_all_argsTupleScheme getScheme() { return new get_type_all_argsTupleScheme(); } } private static class get_type_all_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetName()) { oprot.writeString(struct.name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } } } } public static class get_type_all_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_type_all_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_type_all_resultTupleSchemeFactory()); } private Map success; // required private MetaException o2; // 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"), O2((short)1, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class)))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); } public get_type_all_result() { } public get_type_all_result( Map success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_type_all_result(get_type_all_result other) { if (other.isSetSuccess()) { Map __this__success = new HashMap(); for (Map.Entry other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); Type other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; Type __this__success_copy_value = new Type(other_element_value); __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_type_all_result deepCopy() { return new get_type_all_result(this); } @Override public void clear() { this.success = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, Type val) { if (this.success == null) { this.success = new HashMap(); } this.success.put(key, val); } public Map getSuccess() { return this.success; } public void setSuccess(Map 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 MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_type_all_result) return this.equals((get_type_all_result)that); return false; } public boolean equals(get_type_all_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_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_type_all_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_all_result typedOther = (get_type_all_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(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_type_all_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("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_type_all_resultStandardSchemeFactory implements SchemeFactory { public get_type_all_resultStandardScheme getScheme() { return new get_type_all_resultStandardScheme(); } } private static class get_type_all_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_type_all_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map540 = iprot.readMapBegin(); struct.success = new HashMap(2*_map540.size); for (int _i541 = 0; _i541 < _map540.size; ++_i541) { String _key542; // required Type _val543; // required _key542 = iprot.readString(); _val543 = new Type(); _val543.read(iprot); struct.success.put(_key542, _val543); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_type_all_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Map.Entry _iter544 : struct.success.entrySet()) { oprot.writeString(_iter544.getKey()); _iter544.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_type_all_resultTupleSchemeFactory implements SchemeFactory { public get_type_all_resultTupleScheme getScheme() { return new get_type_all_resultTupleScheme(); } } private static class get_type_all_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry _iter545 : struct.success.entrySet()) { oprot.writeString(_iter545.getKey()); _iter545.getValue().write(oprot); } } } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_type_all_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map546 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new HashMap(2*_map546.size); for (int _i547 = 0; _i547 < _map546.size; ++_i547) { String _key548; // required Type _val549; // required _key548 = iprot.readString(); _val549 = new Type(); _val549.read(iprot); struct.success.put(_key548, _val549); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_fields_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_fields_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_fields_argsTupleSchemeFactory()); } private String db_name; // required private String table_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 { DB_NAME((short)1, "db_name"), TABLE_NAME((short)2, "table_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TABLE_NAME return TABLE_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_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(get_fields_args.class, metaDataMap); } public get_fields_args() { } public get_fields_args( String db_name, String table_name) { this(); this.db_name = db_name; this.table_name = table_name; } /** * Performs a deep copy on other. */ public get_fields_args(get_fields_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTable_name()) { this.table_name = other.table_name; } } public get_fields_args deepCopy() { return new get_fields_args(this); } @Override public void clear() { this.db_name = null; this.table_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTable_name() { return this.table_name; } public void setTable_name(String table_name) { this.table_name = table_name; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TABLE_NAME: return isSetTable_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_fields_args) return this.equals((get_fields_args)that); return false; } public boolean equals(get_fields_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_table_name = true && (isSetTable_name()); builder.append(present_table_name); if (present_table_name) builder.append(table_name); return builder.toHashCode(); } public int compareTo(get_fields_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_args typedOther = (get_fields_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_fields_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_fields_argsStandardSchemeFactory implements SchemeFactory { public get_fields_argsStandardScheme getScheme() { return new get_fields_argsStandardScheme(); } } private static class get_fields_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_fields_argsTupleSchemeFactory implements SchemeFactory { public get_fields_argsTupleScheme getScheme() { return new get_fields_argsTupleScheme(); } } private static class get_fields_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } } } } public static class get_fields_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_fields_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_fields_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private UnknownTableException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, FieldSchema.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); } public get_fields_result() { } public get_fields_result( List success, MetaException o1, UnknownTableException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_fields_result(get_fields_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (FieldSchema other_element : other.success) { __this__success.add(new FieldSchema(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new UnknownTableException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_fields_result deepCopy() { return new get_fields_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public UnknownTableException getO2() { return this.o2; } public void setO2(UnknownTableException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((UnknownTableException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_fields_result) return this.equals((get_fields_result)that); return false; } public boolean equals(get_fields_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_fields_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_result typedOther = (get_fields_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_fields_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_fields_resultStandardSchemeFactory implements SchemeFactory { public get_fields_resultStandardScheme getScheme() { return new get_fields_resultStandardScheme(); } } private static class get_fields_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list550 = iprot.readListBegin(); struct.success = new ArrayList(_list550.size); for (int _i551 = 0; _i551 < _list550.size; ++_i551) { FieldSchema _elem552; // optional _elem552 = new FieldSchema(); _elem552.read(iprot); struct.success.add(_elem552); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (FieldSchema _iter553 : struct.success) { _iter553.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_fields_resultTupleSchemeFactory implements SchemeFactory { public get_fields_resultTupleScheme getScheme() { return new get_fields_resultTupleScheme(); } } private static class get_fields_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (FieldSchema _iter554 : struct.success) { _iter554.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list555 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list555.size); for (int _i556 = 0; _i556 < _list555.size; ++_i556) { FieldSchema _elem557; // optional _elem557 = new FieldSchema(); _elem557.read(iprot); struct.success.add(_elem557); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_fields_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_fields_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_fields_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String table_name; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TABLE_NAME((short)2, "table_name"), ENVIRONMENT_CONTEXT((short)3, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_args.class, metaDataMap); } public get_fields_with_environment_context_args() { } public get_fields_with_environment_context_args( String db_name, String table_name, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.table_name = table_name; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public get_fields_with_environment_context_args(get_fields_with_environment_context_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public get_fields_with_environment_context_args deepCopy() { return new get_fields_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.table_name = null; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTable_name() { return this.table_name; } public void setTable_name(String table_name) { this.table_name = table_name; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((String)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TABLE_NAME: return isSetTable_name(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_fields_with_environment_context_args) return this.equals((get_fields_with_environment_context_args)that); return false; } public boolean equals(get_fields_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_table_name = true && (isSetTable_name()); builder.append(present_table_name); if (present_table_name) builder.append(table_name); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(get_fields_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_with_environment_context_args typedOther = (get_fields_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_fields_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_fields_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public get_fields_with_environment_context_argsStandardScheme getScheme() { return new get_fields_with_environment_context_argsStandardScheme(); } } private static class get_fields_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_fields_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public get_fields_with_environment_context_argsTupleScheme getScheme() { return new get_fields_with_environment_context_argsTupleScheme(); } } private static class get_fields_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetEnvironment_context()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class get_fields_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_fields_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_fields_with_environment_context_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private UnknownTableException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, FieldSchema.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_result.class, metaDataMap); } public get_fields_with_environment_context_result() { } public get_fields_with_environment_context_result( List success, MetaException o1, UnknownTableException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_fields_with_environment_context_result(get_fields_with_environment_context_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (FieldSchema other_element : other.success) { __this__success.add(new FieldSchema(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new UnknownTableException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_fields_with_environment_context_result deepCopy() { return new get_fields_with_environment_context_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public UnknownTableException getO2() { return this.o2; } public void setO2(UnknownTableException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((UnknownTableException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_fields_with_environment_context_result) return this.equals((get_fields_with_environment_context_result)that); return false; } public boolean equals(get_fields_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_fields_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_with_environment_context_result typedOther = (get_fields_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_fields_with_environment_context_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_fields_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public get_fields_with_environment_context_resultStandardScheme getScheme() { return new get_fields_with_environment_context_resultStandardScheme(); } } private static class get_fields_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list558 = iprot.readListBegin(); struct.success = new ArrayList(_list558.size); for (int _i559 = 0; _i559 < _list558.size; ++_i559) { FieldSchema _elem560; // optional _elem560 = new FieldSchema(); _elem560.read(iprot); struct.success.add(_elem560); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_fields_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (FieldSchema _iter561 : struct.success) { _iter561.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_fields_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public get_fields_with_environment_context_resultTupleScheme getScheme() { return new get_fields_with_environment_context_resultTupleScheme(); } } private static class get_fields_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (FieldSchema _iter562 : struct.success) { _iter562.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list563 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list563.size); for (int _i564 = 0; _i564 < _list563.size; ++_i564) { FieldSchema _elem565; // optional _elem565 = new FieldSchema(); _elem565.read(iprot); struct.success.add(_elem565); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_schema_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_schema_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_schema_argsTupleSchemeFactory()); } private String db_name; // required private String table_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 { DB_NAME((short)1, "db_name"), TABLE_NAME((short)2, "table_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TABLE_NAME return TABLE_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_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(get_schema_args.class, metaDataMap); } public get_schema_args() { } public get_schema_args( String db_name, String table_name) { this(); this.db_name = db_name; this.table_name = table_name; } /** * Performs a deep copy on other. */ public get_schema_args(get_schema_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTable_name()) { this.table_name = other.table_name; } } public get_schema_args deepCopy() { return new get_schema_args(this); } @Override public void clear() { this.db_name = null; this.table_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTable_name() { return this.table_name; } public void setTable_name(String table_name) { this.table_name = table_name; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TABLE_NAME: return isSetTable_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_schema_args) return this.equals((get_schema_args)that); return false; } public boolean equals(get_schema_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_table_name = true && (isSetTable_name()); builder.append(present_table_name); if (present_table_name) builder.append(table_name); return builder.toHashCode(); } public int compareTo(get_schema_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_args typedOther = (get_schema_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_schema_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_schema_argsStandardSchemeFactory implements SchemeFactory { public get_schema_argsStandardScheme getScheme() { return new get_schema_argsStandardScheme(); } } private static class get_schema_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_schema_argsTupleSchemeFactory implements SchemeFactory { public get_schema_argsTupleScheme getScheme() { return new get_schema_argsTupleScheme(); } } private static class get_schema_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } } } } public static class get_schema_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_schema_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_schema_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private UnknownTableException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, FieldSchema.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); } public get_schema_result() { } public get_schema_result( List success, MetaException o1, UnknownTableException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_schema_result(get_schema_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (FieldSchema other_element : other.success) { __this__success.add(new FieldSchema(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new UnknownTableException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_schema_result deepCopy() { return new get_schema_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public UnknownTableException getO2() { return this.o2; } public void setO2(UnknownTableException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((UnknownTableException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_schema_result) return this.equals((get_schema_result)that); return false; } public boolean equals(get_schema_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_schema_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_result typedOther = (get_schema_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_schema_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_schema_resultStandardSchemeFactory implements SchemeFactory { public get_schema_resultStandardScheme getScheme() { return new get_schema_resultStandardScheme(); } } private static class get_schema_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list566 = iprot.readListBegin(); struct.success = new ArrayList(_list566.size); for (int _i567 = 0; _i567 < _list566.size; ++_i567) { FieldSchema _elem568; // optional _elem568 = new FieldSchema(); _elem568.read(iprot); struct.success.add(_elem568); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (FieldSchema _iter569 : struct.success) { _iter569.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_schema_resultTupleSchemeFactory implements SchemeFactory { public get_schema_resultTupleScheme getScheme() { return new get_schema_resultTupleScheme(); } } private static class get_schema_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (FieldSchema _iter570 : struct.success) { _iter570.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list571 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list571.size); for (int _i572 = 0; _i572 < _list571.size; ++_i572) { FieldSchema _elem573; // optional _elem573 = new FieldSchema(); _elem573.read(iprot); struct.success.add(_elem573); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_schema_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_schema_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_schema_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String table_name; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TABLE_NAME((short)2, "table_name"), ENVIRONMENT_CONTEXT((short)3, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TABLE_NAME return TABLE_NAME; case 3: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_args.class, metaDataMap); } public get_schema_with_environment_context_args() { } public get_schema_with_environment_context_args( String db_name, String table_name, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.table_name = table_name; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public get_schema_with_environment_context_args(get_schema_with_environment_context_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTable_name()) { this.table_name = other.table_name; } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public get_schema_with_environment_context_args deepCopy() { return new get_schema_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.table_name = null; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTable_name() { return this.table_name; } public void setTable_name(String table_name) { this.table_name = table_name; } public void unsetTable_name() { this.table_name = null; } /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } public void setTable_nameIsSet(boolean value) { if (!value) { this.table_name = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TABLE_NAME: if (value == null) { unsetTable_name(); } else { setTable_name((String)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TABLE_NAME: return isSetTable_name(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_schema_with_environment_context_args) return this.equals((get_schema_with_environment_context_args)that); return false; } public boolean equals(get_schema_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_table_name = true && this.isSetTable_name(); boolean that_present_table_name = true && that.isSetTable_name(); if (this_present_table_name || that_present_table_name) { if (!(this_present_table_name && that_present_table_name)) return false; if (!this.table_name.equals(that.table_name)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_table_name = true && (isSetTable_name()); builder.append(present_table_name); if (present_table_name) builder.append(table_name); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(get_schema_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_with_environment_context_args typedOther = (get_schema_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_schema_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("table_name:"); if (this.table_name == null) { sb.append("null"); } else { sb.append(this.table_name); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_schema_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public get_schema_with_environment_context_argsStandardScheme getScheme() { return new get_schema_with_environment_context_argsStandardScheme(); } } private static class get_schema_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.table_name); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_schema_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public get_schema_with_environment_context_argsTupleScheme getScheme() { return new get_schema_with_environment_context_argsTupleScheme(); } } private static class get_schema_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTable_name()) { optionals.set(1); } if (struct.isSetEnvironment_context()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTable_name()) { oprot.writeString(struct.table_name); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } if (incoming.get(2)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class get_schema_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_schema_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_schema_with_environment_context_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private UnknownTableException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, FieldSchema.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_result.class, metaDataMap); } public get_schema_with_environment_context_result() { } public get_schema_with_environment_context_result( List success, MetaException o1, UnknownTableException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_schema_with_environment_context_result(get_schema_with_environment_context_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (FieldSchema other_element : other.success) { __this__success.add(new FieldSchema(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new UnknownTableException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_schema_with_environment_context_result deepCopy() { return new get_schema_with_environment_context_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public UnknownTableException getO2() { return this.o2; } public void setO2(UnknownTableException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((UnknownTableException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_schema_with_environment_context_result) return this.equals((get_schema_with_environment_context_result)that); return false; } public boolean equals(get_schema_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_schema_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_with_environment_context_result typedOther = (get_schema_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_schema_with_environment_context_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_schema_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public get_schema_with_environment_context_resultStandardScheme getScheme() { return new get_schema_with_environment_context_resultStandardScheme(); } } private static class get_schema_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list574 = iprot.readListBegin(); struct.success = new ArrayList(_list574.size); for (int _i575 = 0; _i575 < _list574.size; ++_i575) { FieldSchema _elem576; // optional _elem576 = new FieldSchema(); _elem576.read(iprot); struct.success.add(_elem576); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_schema_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (FieldSchema _iter577 : struct.success) { _iter577.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_schema_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public get_schema_with_environment_context_resultTupleScheme getScheme() { return new get_schema_with_environment_context_resultTupleScheme(); } } private static class get_schema_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (FieldSchema _iter578 : struct.success) { _iter578.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list579 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list579.size); for (int _i580 = 0; _i580 < _list579.size; ++_i580) { FieldSchema _elem581; // optional _elem581 = new FieldSchema(); _elem581.read(iprot); struct.success.add(_elem581); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new UnknownTableException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class create_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_args"); private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_argsTupleSchemeFactory()); } private Table tbl; // 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 { TBL((short)1, "tbl"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // TBL return TBL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); } public create_table_args() { } public create_table_args( Table tbl) { this(); this.tbl = tbl; } /** * Performs a deep copy on other. */ public create_table_args(create_table_args other) { if (other.isSetTbl()) { this.tbl = new Table(other.tbl); } } public create_table_args deepCopy() { return new create_table_args(this); } @Override public void clear() { this.tbl = null; } public Table getTbl() { return this.tbl; } public void setTbl(Table tbl) { this.tbl = tbl; } public void unsetTbl() { this.tbl = null; } /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ public boolean isSetTbl() { return this.tbl != null; } public void setTblIsSet(boolean value) { if (!value) { this.tbl = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TBL: if (value == null) { unsetTbl(); } else { setTbl((Table)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TBL: return getTbl(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 TBL: return isSetTbl(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_table_args) return this.equals((create_table_args)that); return false; } public boolean equals(create_table_args that) { if (that == null) return false; boolean this_present_tbl = true && this.isSetTbl(); boolean that_present_tbl = true && that.isSetTbl(); if (this_present_tbl || that_present_tbl) { if (!(this_present_tbl && that_present_tbl)) return false; if (!this.tbl.equals(that.tbl)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_tbl = true && (isSetTbl()); builder.append(present_tbl); if (present_tbl) builder.append(tbl); return builder.toHashCode(); } public int compareTo(create_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_args typedOther = (create_table_args)other; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, typedOther.tbl); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_table_args("); boolean first = true; sb.append("tbl:"); if (this.tbl == null) { sb.append("null"); } else { sb.append(this.tbl); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (tbl != null) { tbl.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_argsStandardSchemeFactory implements SchemeFactory { public create_table_argsStandardScheme getScheme() { return new create_table_argsStandardScheme(); } } private static class create_table_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TBL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.tbl = new Table(); struct.tbl.read(iprot); struct.setTblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tbl != null) { oprot.writeFieldBegin(TBL_FIELD_DESC); struct.tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_argsTupleSchemeFactory implements SchemeFactory { public create_table_argsTupleScheme getScheme() { return new create_table_argsTupleScheme(); } } private static class create_table_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTbl()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTbl()) { struct.tbl.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.tbl = new Table(); struct.tbl.read(iprot); struct.setTblIsSet(true); } } } } public static class create_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_resultTupleSchemeFactory()); } private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private NoSuchObjectException o4; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(create_table_result.class, metaDataMap); } public create_table_result() { } public create_table_result( AlreadyExistsException o1, InvalidObjectException o2, MetaException o3, NoSuchObjectException o4) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public create_table_result(create_table_result other) { if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new NoSuchObjectException(other.o4); } } public create_table_result deepCopy() { return new create_table_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public NoSuchObjectException getO4() { return this.o4; } public void setO4(NoSuchObjectException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_table_result) return this.equals((create_table_result)that); return false; } public boolean equals(create_table_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(create_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_result typedOther = (create_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_table_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_resultStandardSchemeFactory implements SchemeFactory { public create_table_resultStandardScheme getScheme() { return new create_table_resultStandardScheme(); } } private static class create_table_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_resultTupleSchemeFactory implements SchemeFactory { public create_table_resultTupleScheme getScheme() { return new create_table_resultTupleScheme(); } } private static class create_table_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } if (struct.isSetO4()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(3)) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class create_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_args"); private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_with_environment_context_argsTupleSchemeFactory()); } private Table tbl; // required private EnvironmentContext environment_context; // 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 { TBL((short)1, "tbl"), ENVIRONMENT_CONTEXT((short)2, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // TBL return TBL; case 2: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_environment_context_args.class, metaDataMap); } public create_table_with_environment_context_args() { } public create_table_with_environment_context_args( Table tbl, EnvironmentContext environment_context) { this(); this.tbl = tbl; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public create_table_with_environment_context_args(create_table_with_environment_context_args other) { if (other.isSetTbl()) { this.tbl = new Table(other.tbl); } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public create_table_with_environment_context_args deepCopy() { return new create_table_with_environment_context_args(this); } @Override public void clear() { this.tbl = null; this.environment_context = null; } public Table getTbl() { return this.tbl; } public void setTbl(Table tbl) { this.tbl = tbl; } public void unsetTbl() { this.tbl = null; } /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ public boolean isSetTbl() { return this.tbl != null; } public void setTblIsSet(boolean value) { if (!value) { this.tbl = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TBL: if (value == null) { unsetTbl(); } else { setTbl((Table)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TBL: return getTbl(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 TBL: return isSetTbl(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_table_with_environment_context_args) return this.equals((create_table_with_environment_context_args)that); return false; } public boolean equals(create_table_with_environment_context_args that) { if (that == null) return false; boolean this_present_tbl = true && this.isSetTbl(); boolean that_present_tbl = true && that.isSetTbl(); if (this_present_tbl || that_present_tbl) { if (!(this_present_tbl && that_present_tbl)) return false; if (!this.tbl.equals(that.tbl)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_tbl = true && (isSetTbl()); builder.append(present_tbl); if (present_tbl) builder.append(tbl); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(create_table_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_with_environment_context_args typedOther = (create_table_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, typedOther.tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_table_with_environment_context_args("); boolean first = true; sb.append("tbl:"); if (this.tbl == null) { sb.append("null"); } else { sb.append(this.tbl); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (tbl != null) { tbl.validate(); } if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public create_table_with_environment_context_argsStandardScheme getScheme() { return new create_table_with_environment_context_argsStandardScheme(); } } private static class create_table_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TBL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.tbl = new Table(); struct.tbl.read(iprot); struct.setTblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tbl != null) { oprot.writeFieldBegin(TBL_FIELD_DESC); struct.tbl.write(oprot); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public create_table_with_environment_context_argsTupleScheme getScheme() { return new create_table_with_environment_context_argsTupleScheme(); } } private static class create_table_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTbl()) { optionals.set(0); } if (struct.isSetEnvironment_context()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetTbl()) { struct.tbl.write(oprot); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.tbl = new Table(); struct.tbl.read(iprot); struct.setTblIsSet(true); } if (incoming.get(1)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class create_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_with_environment_context_resultTupleSchemeFactory()); } private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private NoSuchObjectException o4; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(create_table_with_environment_context_result.class, metaDataMap); } public create_table_with_environment_context_result() { } public create_table_with_environment_context_result( AlreadyExistsException o1, InvalidObjectException o2, MetaException o3, NoSuchObjectException o4) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public create_table_with_environment_context_result(create_table_with_environment_context_result other) { if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new NoSuchObjectException(other.o4); } } public create_table_with_environment_context_result deepCopy() { return new create_table_with_environment_context_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public NoSuchObjectException getO4() { return this.o4; } public void setO4(NoSuchObjectException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_table_with_environment_context_result) return this.equals((create_table_with_environment_context_result)that); return false; } public boolean equals(create_table_with_environment_context_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(create_table_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_with_environment_context_result typedOther = (create_table_with_environment_context_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_table_with_environment_context_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public create_table_with_environment_context_resultStandardScheme getScheme() { return new create_table_with_environment_context_resultStandardScheme(); } } private static class create_table_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public create_table_with_environment_context_resultTupleScheme getScheme() { return new create_table_with_environment_context_resultTupleScheme(); } } private static class create_table_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } if (struct.isSetO4()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(3)) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class drop_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); 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)2); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_table_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_table_argsTupleSchemeFactory()); } private String dbname; // required private String name; // required private boolean deleteData; // 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 { DBNAME((short)1, "dbname"), NAME((short)2, "name"), DELETE_DATA((short)3, "deleteData"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // NAME return NAME; case 3: // DELETE_DATA return DELETE_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); 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.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", 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(drop_table_args.class, metaDataMap); } public drop_table_args() { } public drop_table_args( String dbname, String name, boolean deleteData) { this(); this.dbname = dbname; this.name = name; this.deleteData = deleteData; setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_table_args(drop_table_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetName()) { this.name = other.name; } this.deleteData = other.deleteData; } public drop_table_args deepCopy() { return new drop_table_args(this); } @Override public void clear() { this.dbname = null; this.name = null; setDeleteDataIsSet(false); this.deleteData = false; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = 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 boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case NAME: return getName(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case NAME: return isSetName(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_table_args) return this.equals((drop_table_args)that); return false; } public boolean equals(drop_table_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) 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_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); return builder.toHashCode(); } public int compareTo(drop_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_args typedOther = (drop_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } 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(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_table_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_table_argsStandardSchemeFactory implements SchemeFactory { public drop_table_argsStandardScheme getScheme() { return new drop_table_argsStandardScheme(); } } private static class drop_table_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_table_argsTupleSchemeFactory implements SchemeFactory { public drop_table_argsTupleScheme getScheme() { return new drop_table_argsTupleScheme(); } } private static class drop_table_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetName()) { optionals.set(1); } if (struct.isSetDeleteData()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(2)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } } } } public static class drop_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_table_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_table_resultTupleSchemeFactory()); } private NoSuchObjectException o1; // required private MetaException o3; // 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 { O1((short)1, "o1"), O3((short)2, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(drop_table_result.class, metaDataMap); } public drop_table_result() { } public drop_table_result( NoSuchObjectException o1, MetaException o3) { this(); this.o1 = o1; this.o3 = o3; } /** * Performs a deep copy on other. */ public drop_table_result(drop_table_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public drop_table_result deepCopy() { return new drop_table_result(this); } @Override public void clear() { this.o1 = null; this.o3 = null; } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_table_result) return this.equals((drop_table_result)that); return false; } public boolean equals(drop_table_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(drop_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_result typedOther = (drop_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_table_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_table_resultStandardSchemeFactory implements SchemeFactory { public drop_table_resultStandardScheme getScheme() { return new drop_table_resultStandardScheme(); } } private static class drop_table_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_table_resultTupleSchemeFactory implements SchemeFactory { public drop_table_resultTupleScheme getScheme() { return new drop_table_resultTupleScheme(); } } private static class drop_table_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO3()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class drop_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); 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)2); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_table_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_table_with_environment_context_argsTupleSchemeFactory()); } private String dbname; // required private String name; // required private boolean deleteData; // required private EnvironmentContext environment_context; // 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 { DBNAME((short)1, "dbname"), NAME((short)2, "name"), DELETE_DATA((short)3, "deleteData"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // NAME return NAME; case 3: // DELETE_DATA return DELETE_DATA; case 4: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); 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.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_with_environment_context_args.class, metaDataMap); } public drop_table_with_environment_context_args() { } public drop_table_with_environment_context_args( String dbname, String name, boolean deleteData, EnvironmentContext environment_context) { this(); this.dbname = dbname; this.name = name; this.deleteData = deleteData; setDeleteDataIsSet(true); this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public drop_table_with_environment_context_args(drop_table_with_environment_context_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetName()) { this.name = other.name; } this.deleteData = other.deleteData; if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public drop_table_with_environment_context_args deepCopy() { return new drop_table_with_environment_context_args(this); } @Override public void clear() { this.dbname = null; this.name = null; setDeleteDataIsSet(false); this.deleteData = false; this.environment_context = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = 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 boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case NAME: return getName(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case NAME: return isSetName(); case DELETE_DATA: return isSetDeleteData(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_table_with_environment_context_args) return this.equals((drop_table_with_environment_context_args)that); return false; } public boolean equals(drop_table_with_environment_context_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) 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_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(drop_table_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_with_environment_context_args typedOther = (drop_table_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } 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(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_table_with_environment_context_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public drop_table_with_environment_context_argsStandardScheme getScheme() { return new drop_table_with_environment_context_argsStandardScheme(); } } private static class drop_table_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public drop_table_with_environment_context_argsTupleScheme getScheme() { return new drop_table_with_environment_context_argsTupleScheme(); } } private static class drop_table_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetName()) { optionals.set(1); } if (struct.isSetDeleteData()) { optionals.set(2); } if (struct.isSetEnvironment_context()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(2)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class drop_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_table_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_table_with_environment_context_resultTupleSchemeFactory()); } private NoSuchObjectException o1; // required private MetaException o3; // 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 { O1((short)1, "o1"), O3((short)2, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(drop_table_with_environment_context_result.class, metaDataMap); } public drop_table_with_environment_context_result() { } public drop_table_with_environment_context_result( NoSuchObjectException o1, MetaException o3) { this(); this.o1 = o1; this.o3 = o3; } /** * Performs a deep copy on other. */ public drop_table_with_environment_context_result(drop_table_with_environment_context_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public drop_table_with_environment_context_result deepCopy() { return new drop_table_with_environment_context_result(this); } @Override public void clear() { this.o1 = null; this.o3 = null; } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_table_with_environment_context_result) return this.equals((drop_table_with_environment_context_result)that); return false; } public boolean equals(drop_table_with_environment_context_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(drop_table_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_with_environment_context_result typedOther = (drop_table_with_environment_context_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_table_with_environment_context_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public drop_table_with_environment_context_resultStandardScheme getScheme() { return new drop_table_with_environment_context_resultStandardScheme(); } } private static class drop_table_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public drop_table_with_environment_context_resultTupleScheme getScheme() { return new drop_table_with_environment_context_resultTupleScheme(); } } private static class drop_table_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO3()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_tables_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_tables_argsTupleSchemeFactory()); } private String db_name; // required private String pattern; // 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 { DB_NAME((short)1, "db_name"), PATTERN((short)2, "pattern"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // PATTERN return PATTERN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); } public get_tables_args() { } public get_tables_args( String db_name, String pattern) { this(); this.db_name = db_name; this.pattern = pattern; } /** * Performs a deep copy on other. */ public get_tables_args(get_tables_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetPattern()) { this.pattern = other.pattern; } } public get_tables_args deepCopy() { return new get_tables_args(this); } @Override public void clear() { this.db_name = null; this.pattern = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getPattern() { return this.pattern; } public void setPattern(String pattern) { this.pattern = pattern; } public void unsetPattern() { this.pattern = null; } /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ public boolean isSetPattern() { return this.pattern != null; } public void setPatternIsSet(boolean value) { if (!value) { this.pattern = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case PATTERN: if (value == null) { unsetPattern(); } else { setPattern((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case PATTERN: return getPattern(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case PATTERN: return isSetPattern(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_tables_args) return this.equals((get_tables_args)that); return false; } public boolean equals(get_tables_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_pattern = true && this.isSetPattern(); boolean that_present_pattern = true && that.isSetPattern(); if (this_present_pattern || that_present_pattern) { if (!(this_present_pattern && that_present_pattern)) return false; if (!this.pattern.equals(that.pattern)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_pattern = true && (isSetPattern()); builder.append(present_pattern); if (present_pattern) builder.append(pattern); return builder.toHashCode(); } public int compareTo(get_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_tables_args typedOther = (get_tables_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_tables_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("pattern:"); if (this.pattern == null) { sb.append("null"); } else { sb.append(this.pattern); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_argsStandardSchemeFactory implements SchemeFactory { public get_tables_argsStandardScheme getScheme() { return new get_tables_argsStandardScheme(); } } private static class get_tables_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PATTERN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.pattern != null) { oprot.writeFieldBegin(PATTERN_FIELD_DESC); oprot.writeString(struct.pattern); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_argsTupleSchemeFactory implements SchemeFactory { public get_tables_argsTupleScheme getScheme() { return new get_tables_argsTupleScheme(); } } private static class get_tables_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetPattern()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetPattern()) { oprot.writeString(struct.pattern); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } } } } public static class get_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_tables_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_tables_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); } public get_tables_result() { } public get_tables_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_tables_result(get_tables_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_tables_result deepCopy() { return new get_tables_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_tables_result) return this.equals((get_tables_result)that); return false; } public boolean equals(get_tables_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_tables_result typedOther = (get_tables_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_tables_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_tables_resultStandardSchemeFactory implements SchemeFactory { public get_tables_resultStandardScheme getScheme() { return new get_tables_resultStandardScheme(); } } private static class get_tables_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list582 = iprot.readListBegin(); struct.success = new ArrayList(_list582.size); for (int _i583 = 0; _i583 < _list582.size; ++_i583) { String _elem584; // optional _elem584 = iprot.readString(); struct.success.add(_elem584); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_tables_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter585 : struct.success) { oprot.writeString(_iter585); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_resultTupleSchemeFactory implements SchemeFactory { public get_tables_resultTupleScheme getScheme() { return new get_tables_resultTupleScheme(); } } private static class get_tables_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter586 : struct.success) { oprot.writeString(_iter586); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list587 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list587.size); for (int _i588 = 0; _i588 < _list587.size; ++_i588) { String _elem589; // optional _elem589 = iprot.readString(); struct.success.add(_elem589); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_all_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_tables_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_tables_argsTupleSchemeFactory()); } private String db_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 { DB_NAME((short)1, "db_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_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(get_all_tables_args.class, metaDataMap); } public get_all_tables_args() { } public get_all_tables_args( String db_name) { this(); this.db_name = db_name; } /** * Performs a deep copy on other. */ public get_all_tables_args(get_all_tables_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } } public get_all_tables_args deepCopy() { return new get_all_tables_args(this); } @Override public void clear() { this.db_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_all_tables_args) return this.equals((get_all_tables_args)that); return false; } public boolean equals(get_all_tables_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); return builder.toHashCode(); } public int compareTo(get_all_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_tables_args typedOther = (get_all_tables_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_all_tables_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_tables_argsStandardSchemeFactory implements SchemeFactory { public get_all_tables_argsStandardScheme getScheme() { return new get_all_tables_argsStandardScheme(); } } private static class get_all_tables_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_tables_argsTupleSchemeFactory implements SchemeFactory { public get_all_tables_argsTupleScheme getScheme() { return new get_all_tables_argsTupleScheme(); } } private static class get_all_tables_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } } } } public static class get_all_tables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_tables_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_tables_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); } public get_all_tables_result() { } public get_all_tables_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_all_tables_result(get_all_tables_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_all_tables_result deepCopy() { return new get_all_tables_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_all_tables_result) return this.equals((get_all_tables_result)that); return false; } public boolean equals(get_all_tables_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_all_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_tables_result typedOther = (get_all_tables_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_all_tables_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_tables_resultStandardSchemeFactory implements SchemeFactory { public get_all_tables_resultStandardScheme getScheme() { return new get_all_tables_resultStandardScheme(); } } private static class get_all_tables_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_tables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list590 = iprot.readListBegin(); struct.success = new ArrayList(_list590.size); for (int _i591 = 0; _i591 < _list590.size; ++_i591) { String _elem592; // optional _elem592 = iprot.readString(); struct.success.add(_elem592); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_all_tables_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter593 : struct.success) { oprot.writeString(_iter593); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_tables_resultTupleSchemeFactory implements SchemeFactory { public get_all_tables_resultTupleScheme getScheme() { return new get_all_tables_resultTupleScheme(); } } private static class get_all_tables_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter594 : struct.success) { oprot.writeString(_iter594); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_tables_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list595 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list595.size); for (int _i596 = 0; _i596 < _list595.size; ++_i596) { String _elem597; // optional _elem597 = iprot.readString(); struct.success.add(_elem597); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_argsTupleSchemeFactory()); } private String dbname; // required private String tbl_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 { DBNAME((short)1, "dbname"), TBL_NAME((short)2, "tbl_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // TBL_NAME return TBL_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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_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(get_table_args.class, metaDataMap); } public get_table_args() { } public get_table_args( String dbname, String tbl_name) { this(); this.dbname = dbname; this.tbl_name = tbl_name; } /** * Performs a deep copy on other. */ public get_table_args(get_table_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } } public get_table_args deepCopy() { return new get_table_args(this); } @Override public void clear() { this.dbname = null; this.tbl_name = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case TBL_NAME: return getTbl_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_args) return this.equals((get_table_args)that); return false; } public boolean equals(get_table_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); return builder.toHashCode(); } public int compareTo(get_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_args typedOther = (get_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_argsStandardSchemeFactory implements SchemeFactory { public get_table_argsStandardScheme getScheme() { return new get_table_argsStandardScheme(); } } private static class get_table_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_argsTupleSchemeFactory implements SchemeFactory { public get_table_argsTupleScheme getScheme() { return new get_table_argsTupleScheme(); } } private static class get_table_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } } } } public static class get_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_resultTupleSchemeFactory()); } private Table success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Table.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); } public get_table_result() { } public get_table_result( Table success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_table_result(get_table_result other) { if (other.isSetSuccess()) { this.success = new Table(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_table_result deepCopy() { return new get_table_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Table getSuccess() { return this.success; } public void setSuccess(Table 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Table)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_result) return this.equals((get_table_result)that); return false; } public boolean equals(get_table_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_result typedOther = (get_table_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_resultStandardSchemeFactory implements SchemeFactory { public get_table_resultStandardScheme getScheme() { return new get_table_resultStandardScheme(); } } private static class get_table_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Table(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_resultTupleSchemeFactory implements SchemeFactory { public get_table_resultTupleScheme getScheme() { return new get_table_resultTupleScheme(); } } private static class get_table_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Table(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_table_objects_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_names", org.apache.thrift.protocol.TType.LIST, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_objects_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_objects_by_name_argsTupleSchemeFactory()); } private String dbname; // required private List tbl_names; // 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 { DBNAME((short)1, "dbname"), TBL_NAMES((short)2, "tbl_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // TBL_NAMES return TBL_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tbl_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_args.class, metaDataMap); } public get_table_objects_by_name_args() { } public get_table_objects_by_name_args( String dbname, List tbl_names) { this(); this.dbname = dbname; this.tbl_names = tbl_names; } /** * Performs a deep copy on other. */ public get_table_objects_by_name_args(get_table_objects_by_name_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTbl_names()) { List __this__tbl_names = new ArrayList(); for (String other_element : other.tbl_names) { __this__tbl_names.add(other_element); } this.tbl_names = __this__tbl_names; } } public get_table_objects_by_name_args deepCopy() { return new get_table_objects_by_name_args(this); } @Override public void clear() { this.dbname = null; this.tbl_names = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public int getTbl_namesSize() { return (this.tbl_names == null) ? 0 : this.tbl_names.size(); } public java.util.Iterator getTbl_namesIterator() { return (this.tbl_names == null) ? null : this.tbl_names.iterator(); } public void addToTbl_names(String elem) { if (this.tbl_names == null) { this.tbl_names = new ArrayList(); } this.tbl_names.add(elem); } public List getTbl_names() { return this.tbl_names; } public void setTbl_names(List tbl_names) { this.tbl_names = tbl_names; } public void unsetTbl_names() { this.tbl_names = null; } /** Returns true if field tbl_names is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_names() { return this.tbl_names != null; } public void setTbl_namesIsSet(boolean value) { if (!value) { this.tbl_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case TBL_NAMES: if (value == null) { unsetTbl_names(); } else { setTbl_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case TBL_NAMES: return getTbl_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case TBL_NAMES: return isSetTbl_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_objects_by_name_args) return this.equals((get_table_objects_by_name_args)that); return false; } public boolean equals(get_table_objects_by_name_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tbl_names = true && this.isSetTbl_names(); boolean that_present_tbl_names = true && that.isSetTbl_names(); if (this_present_tbl_names || that_present_tbl_names) { if (!(this_present_tbl_names && that_present_tbl_names)) return false; if (!this.tbl_names.equals(that.tbl_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_tbl_names = true && (isSetTbl_names()); builder.append(present_tbl_names); if (present_tbl_names) builder.append(tbl_names); return builder.toHashCode(); } public int compareTo(get_table_objects_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_objects_by_name_args typedOther = (get_table_objects_by_name_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_names()).compareTo(typedOther.isSetTbl_names()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_names, typedOther.tbl_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_objects_by_name_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("tbl_names:"); if (this.tbl_names == null) { sb.append("null"); } else { sb.append(this.tbl_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_objects_by_name_argsStandardSchemeFactory implements SchemeFactory { public get_table_objects_by_name_argsStandardScheme getScheme() { return new get_table_objects_by_name_argsStandardScheme(); } } private static class get_table_objects_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list598 = iprot.readListBegin(); struct.tbl_names = new ArrayList(_list598.size); for (int _i599 = 0; _i599 < _list598.size; ++_i599) { String _elem600; // optional _elem600 = iprot.readString(); struct.tbl_names.add(_elem600); } iprot.readListEnd(); } struct.setTbl_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tbl_names != null) { oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_names.size())); for (String _iter601 : struct.tbl_names) { oprot.writeString(_iter601); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_objects_by_name_argsTupleSchemeFactory implements SchemeFactory { public get_table_objects_by_name_argsTupleScheme getScheme() { return new get_table_objects_by_name_argsTupleScheme(); } } private static class get_table_objects_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetTbl_names()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetTbl_names()) { { oprot.writeI32(struct.tbl_names.size()); for (String _iter602 : struct.tbl_names) { oprot.writeString(_iter602); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list603 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tbl_names = new ArrayList(_list603.size); for (int _i604 = 0; _i604 < _list603.size; ++_i604) { String _elem605; // optional _elem605 = iprot.readString(); struct.tbl_names.add(_elem605); } } struct.setTbl_namesIsSet(true); } } } } public static class get_table_objects_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_objects_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_objects_by_name_resultTupleSchemeFactory()); } private List
success; // required private MetaException o1; // required private InvalidOperationException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Table.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_result.class, metaDataMap); } public get_table_objects_by_name_result() { } public get_table_objects_by_name_result( List
success, MetaException o1, InvalidOperationException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_table_objects_by_name_result(get_table_objects_by_name_result other) { if (other.isSetSuccess()) { List
__this__success = new ArrayList
(); for (Table other_element : other.success) { __this__success.add(new Table(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidOperationException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_table_objects_by_name_result deepCopy() { return new get_table_objects_by_name_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator
getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Table elem) { if (this.success == null) { this.success = new ArrayList
(); } this.success.add(elem); } public List
getSuccess() { return this.success; } public void setSuccess(List
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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidOperationException getO2() { return this.o2; } public void setO2(InvalidOperationException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List
)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidOperationException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_objects_by_name_result) return this.equals((get_table_objects_by_name_result)that); return false; } public boolean equals(get_table_objects_by_name_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_table_objects_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_objects_by_name_result typedOther = (get_table_objects_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_objects_by_name_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_objects_by_name_resultStandardSchemeFactory implements SchemeFactory { public get_table_objects_by_name_resultStandardScheme getScheme() { return new get_table_objects_by_name_resultStandardScheme(); } } private static class get_table_objects_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list606 = iprot.readListBegin(); struct.success = new ArrayList
(_list606.size); for (int _i607 = 0; _i607 < _list606.size; ++_i607) { Table _elem608; // optional _elem608 = new Table(); _elem608.read(iprot); struct.success.add(_elem608); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Table _iter609 : struct.success) { _iter609.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_objects_by_name_resultTupleSchemeFactory implements SchemeFactory { public get_table_objects_by_name_resultTupleScheme getScheme() { return new get_table_objects_by_name_resultTupleScheme(); } } private static class get_table_objects_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Table _iter610 : struct.success) { _iter610.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list611 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList
(_list611.size); for (int _i612 = 0; _i612 < _list611.size; ++_i612) { Table _elem613; // optional _elem613 = new Table(); _elem613.read(iprot); struct.success.add(_elem613); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class get_table_names_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_tables", org.apache.thrift.protocol.TType.I16, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_names_by_filter_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_names_by_filter_argsTupleSchemeFactory()); } private String dbname; // required private String filter; // required private short max_tables; // 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 { DBNAME((short)1, "dbname"), FILTER((short)2, "filter"), MAX_TABLES((short)3, "max_tables"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // FILTER return FILTER; case 3: // MAX_TABLES return MAX_TABLES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_TABLES_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_TABLES, new org.apache.thrift.meta_data.FieldMetaData("max_tables", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_args.class, metaDataMap); } public get_table_names_by_filter_args() { this.max_tables = (short)-1; } public get_table_names_by_filter_args( String dbname, String filter, short max_tables) { this(); this.dbname = dbname; this.filter = filter; this.max_tables = max_tables; setMax_tablesIsSet(true); } /** * Performs a deep copy on other. */ public get_table_names_by_filter_args(get_table_names_by_filter_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetFilter()) { this.filter = other.filter; } this.max_tables = other.max_tables; } public get_table_names_by_filter_args deepCopy() { return new get_table_names_by_filter_args(this); } @Override public void clear() { this.dbname = null; this.filter = null; this.max_tables = (short)-1; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getFilter() { return this.filter; } public void setFilter(String filter) { this.filter = filter; } public void unsetFilter() { this.filter = null; } /** Returns true if field filter is set (has been assigned a value) and false otherwise */ public boolean isSetFilter() { return this.filter != null; } public void setFilterIsSet(boolean value) { if (!value) { this.filter = null; } } public short getMax_tables() { return this.max_tables; } public void setMax_tables(short max_tables) { this.max_tables = max_tables; setMax_tablesIsSet(true); } public void unsetMax_tables() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } /** Returns true if field max_tables is set (has been assigned a value) and false otherwise */ public boolean isSetMax_tables() { return EncodingUtils.testBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); } public void setMax_tablesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_TABLES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case FILTER: if (value == null) { unsetFilter(); } else { setFilter((String)value); } break; case MAX_TABLES: if (value == null) { unsetMax_tables(); } else { setMax_tables((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case FILTER: return getFilter(); case MAX_TABLES: return Short.valueOf(getMax_tables()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case FILTER: return isSetFilter(); case MAX_TABLES: return isSetMax_tables(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_names_by_filter_args) return this.equals((get_table_names_by_filter_args)that); return false; } public boolean equals(get_table_names_by_filter_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_filter = true && this.isSetFilter(); boolean that_present_filter = true && that.isSetFilter(); if (this_present_filter || that_present_filter) { if (!(this_present_filter && that_present_filter)) return false; if (!this.filter.equals(that.filter)) return false; } boolean this_present_max_tables = true; boolean that_present_max_tables = true; if (this_present_max_tables || that_present_max_tables) { if (!(this_present_max_tables && that_present_max_tables)) return false; if (this.max_tables != that.max_tables) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_filter = true && (isSetFilter()); builder.append(present_filter); if (present_filter) builder.append(filter); boolean present_max_tables = true; builder.append(present_max_tables); if (present_max_tables) builder.append(max_tables); return builder.toHashCode(); } public int compareTo(get_table_names_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_names_by_filter_args typedOther = (get_table_names_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(typedOther.isSetMax_tables()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_tables()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_tables, typedOther.max_tables); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_names_by_filter_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("filter:"); if (this.filter == null) { sb.append("null"); } else { sb.append(this.filter); } first = false; if (!first) sb.append(", "); sb.append("max_tables:"); sb.append(this.max_tables); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_names_by_filter_argsStandardSchemeFactory implements SchemeFactory { public get_table_names_by_filter_argsStandardScheme getScheme() { return new get_table_names_by_filter_argsStandardScheme(); } } private static class get_table_names_by_filter_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FILTER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_TABLES if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_tables = iprot.readI16(); struct.setMax_tablesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.filter != null) { oprot.writeFieldBegin(FILTER_FIELD_DESC); oprot.writeString(struct.filter); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); oprot.writeI16(struct.max_tables); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_names_by_filter_argsTupleSchemeFactory implements SchemeFactory { public get_table_names_by_filter_argsTupleScheme getScheme() { return new get_table_names_by_filter_argsTupleScheme(); } } private static class get_table_names_by_filter_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetFilter()) { optionals.set(1); } if (struct.isSetMax_tables()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetFilter()) { oprot.writeString(struct.filter); } if (struct.isSetMax_tables()) { oprot.writeI16(struct.max_tables); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } if (incoming.get(2)) { struct.max_tables = iprot.readI16(); struct.setMax_tablesIsSet(true); } } } } public static class get_table_names_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_names_by_filter_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_names_by_filter_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private InvalidOperationException o2; // required private UnknownDBException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_result.class, metaDataMap); } public get_table_names_by_filter_result() { } public get_table_names_by_filter_result( List success, MetaException o1, InvalidOperationException o2, UnknownDBException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public get_table_names_by_filter_result(get_table_names_by_filter_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidOperationException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_table_names_by_filter_result deepCopy() { return new get_table_names_by_filter_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidOperationException getO2() { return this.o2; } public void setO2(InvalidOperationException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidOperationException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_names_by_filter_result) return this.equals((get_table_names_by_filter_result)that); return false; } public boolean equals(get_table_names_by_filter_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(get_table_names_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_names_by_filter_result typedOther = (get_table_names_by_filter_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_names_by_filter_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_names_by_filter_resultStandardSchemeFactory implements SchemeFactory { public get_table_names_by_filter_resultStandardScheme getScheme() { return new get_table_names_by_filter_resultStandardScheme(); } } private static class get_table_names_by_filter_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list614 = iprot.readListBegin(); struct.success = new ArrayList(_list614.size); for (int _i615 = 0; _i615 < _list614.size; ++_i615) { String _elem616; // optional _elem616 = iprot.readString(); struct.success.add(_elem616); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter617 : struct.success) { oprot.writeString(_iter617); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_names_by_filter_resultTupleSchemeFactory implements SchemeFactory { public get_table_names_by_filter_resultTupleScheme getScheme() { return new get_table_names_by_filter_resultTupleScheme(); } } private static class get_table_names_by_filter_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter618 : struct.success) { oprot.writeString(_iter618); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_names_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list619 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list619.size); for (int _i620 = 0; _i620 < _list619.size; ++_i620) { String _elem621; // optional _elem621 = iprot.readString(); struct.success.add(_elem621); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidOperationException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class alter_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_argsTupleSchemeFactory()); } private String dbname; // required private String tbl_name; // required private Table new_tbl; // 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 { DBNAME((short)1, "dbname"), TBL_NAME((short)2, "tbl_name"), NEW_TBL((short)3, "new_tbl"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_TBL return NEW_TBL; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); } public alter_table_args() { } public alter_table_args( String dbname, String tbl_name, Table new_tbl) { this(); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; } /** * Performs a deep copy on other. */ public alter_table_args(alter_table_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_tbl()) { this.new_tbl = new Table(other.new_tbl); } } public alter_table_args deepCopy() { return new alter_table_args(this); } @Override public void clear() { this.dbname = null; this.tbl_name = null; this.new_tbl = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public Table getNew_tbl() { return this.new_tbl; } public void setNew_tbl(Table new_tbl) { this.new_tbl = new_tbl; } public void unsetNew_tbl() { this.new_tbl = null; } /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ public boolean isSetNew_tbl() { return this.new_tbl != null; } public void setNew_tblIsSet(boolean value) { if (!value) { this.new_tbl = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_TBL: if (value == null) { unsetNew_tbl(); } else { setNew_tbl((Table)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case TBL_NAME: return getTbl_name(); case NEW_TBL: return getNew_tbl(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); case NEW_TBL: return isSetNew_tbl(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_args) return this.equals((alter_table_args)that); return false; } public boolean equals(alter_table_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_tbl = true && this.isSetNew_tbl(); boolean that_present_new_tbl = true && that.isSetNew_tbl(); if (this_present_new_tbl || that_present_new_tbl) { if (!(this_present_new_tbl && that_present_new_tbl)) return false; if (!this.new_tbl.equals(that.new_tbl)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); builder.append(present_new_tbl); if (present_new_tbl) builder.append(new_tbl); return builder.toHashCode(); } public int compareTo(alter_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_args typedOther = (alter_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_tbl:"); if (this.new_tbl == null) { sb.append("null"); } else { sb.append(this.new_tbl); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_tbl != null) { new_tbl.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_argsStandardSchemeFactory implements SchemeFactory { public alter_table_argsStandardScheme getScheme() { return new alter_table_argsStandardScheme(); } } private static class alter_table_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_TBL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_tbl != null) { oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); struct.new_tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_argsTupleSchemeFactory implements SchemeFactory { public alter_table_argsTupleScheme getScheme() { return new alter_table_argsTupleScheme(); } } private static class alter_table_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_tbl()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_tbl()) { struct.new_tbl.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } } } } public static class alter_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_table_result.class, metaDataMap); } public alter_table_result() { } public alter_table_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_table_result(alter_table_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_table_result deepCopy() { return new alter_table_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_result) return this.equals((alter_table_result)that); return false; } public boolean equals(alter_table_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_result typedOther = (alter_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_resultStandardSchemeFactory implements SchemeFactory { public alter_table_resultStandardScheme getScheme() { return new alter_table_resultStandardScheme(); } } private static class alter_table_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_resultTupleSchemeFactory implements SchemeFactory { public alter_table_resultTupleScheme getScheme() { return new alter_table_resultTupleScheme(); } } private static class alter_table_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class alter_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_with_environment_context_argsTupleSchemeFactory()); } private String dbname; // required private String tbl_name; // required private Table new_tbl; // required private EnvironmentContext environment_context; // 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 { DBNAME((short)1, "dbname"), TBL_NAME((short)2, "tbl_name"), NEW_TBL((short)3, "new_tbl"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_TBL return NEW_TBL; case 4: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_environment_context_args.class, metaDataMap); } public alter_table_with_environment_context_args() { } public alter_table_with_environment_context_args( String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) { this(); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public alter_table_with_environment_context_args(alter_table_with_environment_context_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_tbl()) { this.new_tbl = new Table(other.new_tbl); } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public alter_table_with_environment_context_args deepCopy() { return new alter_table_with_environment_context_args(this); } @Override public void clear() { this.dbname = null; this.tbl_name = null; this.new_tbl = null; this.environment_context = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public Table getNew_tbl() { return this.new_tbl; } public void setNew_tbl(Table new_tbl) { this.new_tbl = new_tbl; } public void unsetNew_tbl() { this.new_tbl = null; } /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ public boolean isSetNew_tbl() { return this.new_tbl != null; } public void setNew_tblIsSet(boolean value) { if (!value) { this.new_tbl = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_TBL: if (value == null) { unsetNew_tbl(); } else { setNew_tbl((Table)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case TBL_NAME: return getTbl_name(); case NEW_TBL: return getNew_tbl(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); case NEW_TBL: return isSetNew_tbl(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_with_environment_context_args) return this.equals((alter_table_with_environment_context_args)that); return false; } public boolean equals(alter_table_with_environment_context_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_tbl = true && this.isSetNew_tbl(); boolean that_present_new_tbl = true && that.isSetNew_tbl(); if (this_present_new_tbl || that_present_new_tbl) { if (!(this_present_new_tbl && that_present_new_tbl)) return false; if (!this.new_tbl.equals(that.new_tbl)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); builder.append(present_new_tbl); if (present_new_tbl) builder.append(new_tbl); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(alter_table_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_with_environment_context_args typedOther = (alter_table_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_with_environment_context_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_tbl:"); if (this.new_tbl == null) { sb.append("null"); } else { sb.append(this.new_tbl); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_tbl != null) { new_tbl.validate(); } if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public alter_table_with_environment_context_argsStandardScheme getScheme() { return new alter_table_with_environment_context_argsStandardScheme(); } } private static class alter_table_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_TBL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_tbl != null) { oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); struct.new_tbl.write(oprot); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public alter_table_with_environment_context_argsTupleScheme getScheme() { return new alter_table_with_environment_context_argsTupleScheme(); } } private static class alter_table_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_tbl()) { optionals.set(2); } if (struct.isSetEnvironment_context()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_tbl()) { struct.new_tbl.write(oprot); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class alter_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_with_environment_context_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_table_with_environment_context_result.class, metaDataMap); } public alter_table_with_environment_context_result() { } public alter_table_with_environment_context_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_table_with_environment_context_result(alter_table_with_environment_context_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_table_with_environment_context_result deepCopy() { return new alter_table_with_environment_context_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_with_environment_context_result) return this.equals((alter_table_with_environment_context_result)that); return false; } public boolean equals(alter_table_with_environment_context_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_table_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_with_environment_context_result typedOther = (alter_table_with_environment_context_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_with_environment_context_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public alter_table_with_environment_context_resultStandardScheme getScheme() { return new alter_table_with_environment_context_resultStandardScheme(); } } private static class alter_table_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public alter_table_with_environment_context_resultTupleScheme getScheme() { return new alter_table_with_environment_context_resultTupleScheme(); } } private static class alter_table_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class alter_table_with_cascade_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_with_cascade_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_with_cascade_argsTupleSchemeFactory()); } private String dbname; // required private String tbl_name; // required private Table new_tbl; // required private boolean cascade; // 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 { DBNAME((short)1, "dbname"), TBL_NAME((short)2, "tbl_name"), NEW_TBL((short)3, "new_tbl"), CASCADE((short)4, "cascade"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_TBL return NEW_TBL; case 4: // CASCADE return CASCADE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __CASCADE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", 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(alter_table_with_cascade_args.class, metaDataMap); } public alter_table_with_cascade_args() { } public alter_table_with_cascade_args( String dbname, String tbl_name, Table new_tbl, boolean cascade) { this(); this.dbname = dbname; this.tbl_name = tbl_name; this.new_tbl = new_tbl; this.cascade = cascade; setCascadeIsSet(true); } /** * Performs a deep copy on other. */ public alter_table_with_cascade_args(alter_table_with_cascade_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_tbl()) { this.new_tbl = new Table(other.new_tbl); } this.cascade = other.cascade; } public alter_table_with_cascade_args deepCopy() { return new alter_table_with_cascade_args(this); } @Override public void clear() { this.dbname = null; this.tbl_name = null; this.new_tbl = null; setCascadeIsSet(false); this.cascade = false; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public Table getNew_tbl() { return this.new_tbl; } public void setNew_tbl(Table new_tbl) { this.new_tbl = new_tbl; } public void unsetNew_tbl() { this.new_tbl = null; } /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ public boolean isSetNew_tbl() { return this.new_tbl != null; } public void setNew_tblIsSet(boolean value) { if (!value) { this.new_tbl = null; } } public boolean isCascade() { return this.cascade; } public void setCascade(boolean cascade) { this.cascade = cascade; setCascadeIsSet(true); } public void unsetCascade() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { return EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_TBL: if (value == null) { unsetNew_tbl(); } else { setNew_tbl((Table)value); } break; case CASCADE: if (value == null) { unsetCascade(); } else { setCascade((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case TBL_NAME: return getTbl_name(); case NEW_TBL: return getNew_tbl(); case CASCADE: return Boolean.valueOf(isCascade()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); case NEW_TBL: return isSetNew_tbl(); case CASCADE: return isSetCascade(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_with_cascade_args) return this.equals((alter_table_with_cascade_args)that); return false; } public boolean equals(alter_table_with_cascade_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_tbl = true && this.isSetNew_tbl(); boolean that_present_new_tbl = true && that.isSetNew_tbl(); if (this_present_new_tbl || that_present_new_tbl) { if (!(this_present_new_tbl && that_present_new_tbl)) return false; if (!this.new_tbl.equals(that.new_tbl)) return false; } boolean this_present_cascade = true; boolean that_present_cascade = true; if (this_present_cascade || that_present_cascade) { if (!(this_present_cascade && that_present_cascade)) return false; if (this.cascade != that.cascade) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); builder.append(present_new_tbl); if (present_new_tbl) builder.append(new_tbl); boolean present_cascade = true; builder.append(present_cascade); if (present_cascade) builder.append(cascade); return builder.toHashCode(); } public int compareTo(alter_table_with_cascade_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_with_cascade_args typedOther = (alter_table_with_cascade_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(typedOther.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, typedOther.cascade); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_with_cascade_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_tbl:"); if (this.new_tbl == null) { sb.append("null"); } else { sb.append(this.new_tbl); } first = false; if (!first) sb.append(", "); sb.append("cascade:"); sb.append(this.cascade); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_tbl != null) { new_tbl.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_with_cascade_argsStandardSchemeFactory implements SchemeFactory { public alter_table_with_cascade_argsStandardScheme getScheme() { return new alter_table_with_cascade_argsStandardScheme(); } } private static class alter_table_with_cascade_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_TBL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // CASCADE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_cascade_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_tbl != null) { oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); struct.new_tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(CASCADE_FIELD_DESC); oprot.writeBool(struct.cascade); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_with_cascade_argsTupleSchemeFactory implements SchemeFactory { public alter_table_with_cascade_argsTupleScheme getScheme() { return new alter_table_with_cascade_argsTupleScheme(); } } private static class alter_table_with_cascade_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_tbl()) { optionals.set(2); } if (struct.isSetCascade()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_tbl()) { struct.new_tbl.write(oprot); } if (struct.isSetCascade()) { oprot.writeBool(struct.cascade); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.new_tbl = new Table(); struct.new_tbl.read(iprot); struct.setNew_tblIsSet(true); } if (incoming.get(3)) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } } } } public static class alter_table_with_cascade_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_table_with_cascade_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_table_with_cascade_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_table_with_cascade_result.class, metaDataMap); } public alter_table_with_cascade_result() { } public alter_table_with_cascade_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_table_with_cascade_result(alter_table_with_cascade_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_table_with_cascade_result deepCopy() { return new alter_table_with_cascade_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_table_with_cascade_result) return this.equals((alter_table_with_cascade_result)that); return false; } public boolean equals(alter_table_with_cascade_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_table_with_cascade_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_with_cascade_result typedOther = (alter_table_with_cascade_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_table_with_cascade_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_table_with_cascade_resultStandardSchemeFactory implements SchemeFactory { public alter_table_with_cascade_resultStandardScheme getScheme() { return new alter_table_with_cascade_resultStandardScheme(); } } private static class alter_table_with_cascade_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_table_with_cascade_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_table_with_cascade_resultTupleSchemeFactory implements SchemeFactory { public alter_table_with_cascade_resultTupleScheme getScheme() { return new alter_table_with_cascade_resultTupleScheme(); } } private static class alter_table_with_cascade_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class add_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_args"); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partition_argsTupleSchemeFactory()); } private Partition new_part; // 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 { NEW_PART((short)1, "new_part"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // NEW_PART return NEW_PART; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); } public add_partition_args() { } public add_partition_args( Partition new_part) { this(); this.new_part = new_part; } /** * Performs a deep copy on other. */ public add_partition_args(add_partition_args other) { if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } } public add_partition_args deepCopy() { return new add_partition_args(this); } @Override public void clear() { this.new_part = null; } public Partition getNew_part() { return this.new_part; } public void setNew_part(Partition new_part) { this.new_part = new_part; } public void unsetNew_part() { this.new_part = null; } /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } public void setNew_partIsSet(boolean value) { if (!value) { this.new_part = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NEW_PART: if (value == null) { unsetNew_part(); } else { setNew_part((Partition)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NEW_PART: return getNew_part(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 NEW_PART: return isSetNew_part(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partition_args) return this.equals((add_partition_args)that); return false; } public boolean equals(add_partition_args that) { if (that == null) return false; boolean this_present_new_part = true && this.isSetNew_part(); boolean that_present_new_part = true && that.isSetNew_part(); if (this_present_new_part || that_present_new_part) { if (!(this_present_new_part && that_present_new_part)) return false; if (!this.new_part.equals(that.new_part)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_new_part = true && (isSetNew_part()); builder.append(present_new_part); if (present_new_part) builder.append(new_part); return builder.toHashCode(); } public int compareTo(add_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_args typedOther = (add_partition_args)other; lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partition_args("); boolean first = true; sb.append("new_part:"); if (this.new_part == null) { sb.append("null"); } else { sb.append(this.new_part); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_part != null) { new_part.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partition_argsStandardSchemeFactory implements SchemeFactory { public add_partition_argsStandardScheme getScheme() { return new add_partition_argsStandardScheme(); } } private static class add_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NEW_PART if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); struct.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partition_argsTupleSchemeFactory implements SchemeFactory { public add_partition_argsTupleScheme getScheme() { return new add_partition_argsTupleScheme(); } } private static class add_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNew_part()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNew_part()) { struct.new_part.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } } } } public static class add_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partition_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_partition_result.class, metaDataMap); } public add_partition_result() { } public add_partition_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_partition_result(add_partition_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_partition_result deepCopy() { return new add_partition_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partition_result) return this.equals((add_partition_result)that); return false; } public boolean equals(add_partition_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_result typedOther = (add_partition_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partition_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partition_resultStandardSchemeFactory implements SchemeFactory { public add_partition_resultStandardScheme getScheme() { return new add_partition_resultStandardScheme(); } } private static class add_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partition_resultTupleSchemeFactory implements SchemeFactory { public add_partition_resultTupleScheme getScheme() { return new add_partition_resultTupleScheme(); } } private static class add_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class add_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_args"); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partition_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partition_with_environment_context_argsTupleSchemeFactory()); } private Partition new_part; // required private EnvironmentContext environment_context; // 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 { NEW_PART((short)1, "new_part"), ENVIRONMENT_CONTEXT((short)2, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // NEW_PART return NEW_PART; case 2: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_with_environment_context_args.class, metaDataMap); } public add_partition_with_environment_context_args() { } public add_partition_with_environment_context_args( Partition new_part, EnvironmentContext environment_context) { this(); this.new_part = new_part; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public add_partition_with_environment_context_args(add_partition_with_environment_context_args other) { if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public add_partition_with_environment_context_args deepCopy() { return new add_partition_with_environment_context_args(this); } @Override public void clear() { this.new_part = null; this.environment_context = null; } public Partition getNew_part() { return this.new_part; } public void setNew_part(Partition new_part) { this.new_part = new_part; } public void unsetNew_part() { this.new_part = null; } /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } public void setNew_partIsSet(boolean value) { if (!value) { this.new_part = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NEW_PART: if (value == null) { unsetNew_part(); } else { setNew_part((Partition)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NEW_PART: return getNew_part(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 NEW_PART: return isSetNew_part(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partition_with_environment_context_args) return this.equals((add_partition_with_environment_context_args)that); return false; } public boolean equals(add_partition_with_environment_context_args that) { if (that == null) return false; boolean this_present_new_part = true && this.isSetNew_part(); boolean that_present_new_part = true && that.isSetNew_part(); if (this_present_new_part || that_present_new_part) { if (!(this_present_new_part && that_present_new_part)) return false; if (!this.new_part.equals(that.new_part)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_new_part = true && (isSetNew_part()); builder.append(present_new_part); if (present_new_part) builder.append(new_part); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(add_partition_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_with_environment_context_args typedOther = (add_partition_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partition_with_environment_context_args("); boolean first = true; sb.append("new_part:"); if (this.new_part == null) { sb.append("null"); } else { sb.append(this.new_part); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_part != null) { new_part.validate(); } if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public add_partition_with_environment_context_argsStandardScheme getScheme() { return new add_partition_with_environment_context_argsStandardScheme(); } } private static class add_partition_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NEW_PART if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); struct.new_part.write(oprot); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public add_partition_with_environment_context_argsTupleScheme getScheme() { return new add_partition_with_environment_context_argsTupleScheme(); } } private static class add_partition_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNew_part()) { optionals.set(0); } if (struct.isSetEnvironment_context()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetNew_part()) { struct.new_part.write(oprot); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } if (incoming.get(1)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class add_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partition_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partition_with_environment_context_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_partition_with_environment_context_result.class, metaDataMap); } public add_partition_with_environment_context_result() { } public add_partition_with_environment_context_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_partition_with_environment_context_result(add_partition_with_environment_context_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_partition_with_environment_context_result deepCopy() { return new add_partition_with_environment_context_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partition_with_environment_context_result) return this.equals((add_partition_with_environment_context_result)that); return false; } public boolean equals(add_partition_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_partition_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_with_environment_context_result typedOther = (add_partition_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partition_with_environment_context_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public add_partition_with_environment_context_resultStandardScheme getScheme() { return new add_partition_with_environment_context_resultStandardScheme(); } } private static class add_partition_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public add_partition_with_environment_context_resultTupleScheme getScheme() { return new add_partition_with_environment_context_resultTupleScheme(); } } private static class add_partition_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class add_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_args"); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_argsTupleSchemeFactory()); } private List new_parts; // 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 { NEW_PARTS((short)1, "new_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // NEW_PARTS return NEW_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", 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, Partition.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_args.class, metaDataMap); } public add_partitions_args() { } public add_partitions_args( List new_parts) { this(); this.new_parts = new_parts; } /** * Performs a deep copy on other. */ public add_partitions_args(add_partitions_args other) { if (other.isSetNew_parts()) { List __this__new_parts = new ArrayList(); for (Partition other_element : other.new_parts) { __this__new_parts.add(new Partition(other_element)); } this.new_parts = __this__new_parts; } } public add_partitions_args deepCopy() { return new add_partitions_args(this); } @Override public void clear() { this.new_parts = null; } public int getNew_partsSize() { return (this.new_parts == null) ? 0 : this.new_parts.size(); } public java.util.Iterator getNew_partsIterator() { return (this.new_parts == null) ? null : this.new_parts.iterator(); } public void addToNew_parts(Partition elem) { if (this.new_parts == null) { this.new_parts = new ArrayList(); } this.new_parts.add(elem); } public List getNew_parts() { return this.new_parts; } public void setNew_parts(List new_parts) { this.new_parts = new_parts; } public void unsetNew_parts() { this.new_parts = null; } /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ public boolean isSetNew_parts() { return this.new_parts != null; } public void setNew_partsIsSet(boolean value) { if (!value) { this.new_parts = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NEW_PARTS: if (value == null) { unsetNew_parts(); } else { setNew_parts((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NEW_PARTS: return getNew_parts(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 NEW_PARTS: return isSetNew_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_args) return this.equals((add_partitions_args)that); return false; } public boolean equals(add_partitions_args that) { if (that == null) return false; boolean this_present_new_parts = true && this.isSetNew_parts(); boolean that_present_new_parts = true && that.isSetNew_parts(); if (this_present_new_parts || that_present_new_parts) { if (!(this_present_new_parts && that_present_new_parts)) return false; if (!this.new_parts.equals(that.new_parts)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_new_parts = true && (isSetNew_parts()); builder.append(present_new_parts); if (present_new_parts) builder.append(new_parts); return builder.toHashCode(); } public int compareTo(add_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_args typedOther = (add_partitions_args)other; lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(typedOther.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, typedOther.new_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_args("); boolean first = true; sb.append("new_parts:"); if (this.new_parts == null) { sb.append("null"); } else { sb.append(this.new_parts); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_argsStandardSchemeFactory implements SchemeFactory { public add_partitions_argsStandardScheme getScheme() { return new add_partitions_argsStandardScheme(); } } private static class add_partitions_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NEW_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list622 = iprot.readListBegin(); struct.new_parts = new ArrayList(_list622.size); for (int _i623 = 0; _i623 < _list622.size; ++_i623) { Partition _elem624; // optional _elem624 = new Partition(); _elem624.read(iprot); struct.new_parts.add(_elem624); } iprot.readListEnd(); } struct.setNew_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.new_parts != null) { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); for (Partition _iter625 : struct.new_parts) { _iter625.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_argsTupleSchemeFactory implements SchemeFactory { public add_partitions_argsTupleScheme getScheme() { return new add_partitions_argsTupleScheme(); } } private static class add_partitions_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNew_parts()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNew_parts()) { { oprot.writeI32(struct.new_parts.size()); for (Partition _iter626 : struct.new_parts) { _iter626.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list627 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList(_list627.size); for (int _i628 = 0; _i628 < _list627.size; ++_i628) { Partition _elem629; // optional _elem629 = new Partition(); _elem629.read(iprot); struct.new_parts.add(_elem629); } } struct.setNew_partsIsSet(true); } } } } public static class add_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_resultTupleSchemeFactory()); } private int success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_partitions_result.class, metaDataMap); } public add_partitions_result() { } public add_partitions_result( int success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_partitions_result(add_partitions_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_partitions_result deepCopy() { return new add_partitions_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccess() { return this.success; } public void setSuccess(int success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_result) return this.equals((add_partitions_result)that); return false; } public boolean equals(add_partitions_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_result typedOther = (add_partitions_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_resultStandardSchemeFactory implements SchemeFactory { public add_partitions_resultStandardScheme getScheme() { return new add_partitions_resultStandardScheme(); } } private static class add_partitions_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_resultTupleSchemeFactory implements SchemeFactory { public add_partitions_resultTupleScheme getScheme() { return new add_partitions_resultTupleScheme(); } } private static class add_partitions_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class add_partitions_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_args"); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_pspec_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_pspec_argsTupleSchemeFactory()); } private List new_parts; // 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 { NEW_PARTS((short)1, "new_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // NEW_PARTS return NEW_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", 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, PartitionSpec.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_pspec_args.class, metaDataMap); } public add_partitions_pspec_args() { } public add_partitions_pspec_args( List new_parts) { this(); this.new_parts = new_parts; } /** * Performs a deep copy on other. */ public add_partitions_pspec_args(add_partitions_pspec_args other) { if (other.isSetNew_parts()) { List __this__new_parts = new ArrayList(); for (PartitionSpec other_element : other.new_parts) { __this__new_parts.add(new PartitionSpec(other_element)); } this.new_parts = __this__new_parts; } } public add_partitions_pspec_args deepCopy() { return new add_partitions_pspec_args(this); } @Override public void clear() { this.new_parts = null; } public int getNew_partsSize() { return (this.new_parts == null) ? 0 : this.new_parts.size(); } public java.util.Iterator getNew_partsIterator() { return (this.new_parts == null) ? null : this.new_parts.iterator(); } public void addToNew_parts(PartitionSpec elem) { if (this.new_parts == null) { this.new_parts = new ArrayList(); } this.new_parts.add(elem); } public List getNew_parts() { return this.new_parts; } public void setNew_parts(List new_parts) { this.new_parts = new_parts; } public void unsetNew_parts() { this.new_parts = null; } /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ public boolean isSetNew_parts() { return this.new_parts != null; } public void setNew_partsIsSet(boolean value) { if (!value) { this.new_parts = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NEW_PARTS: if (value == null) { unsetNew_parts(); } else { setNew_parts((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NEW_PARTS: return getNew_parts(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 NEW_PARTS: return isSetNew_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_pspec_args) return this.equals((add_partitions_pspec_args)that); return false; } public boolean equals(add_partitions_pspec_args that) { if (that == null) return false; boolean this_present_new_parts = true && this.isSetNew_parts(); boolean that_present_new_parts = true && that.isSetNew_parts(); if (this_present_new_parts || that_present_new_parts) { if (!(this_present_new_parts && that_present_new_parts)) return false; if (!this.new_parts.equals(that.new_parts)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_new_parts = true && (isSetNew_parts()); builder.append(present_new_parts); if (present_new_parts) builder.append(new_parts); return builder.toHashCode(); } public int compareTo(add_partitions_pspec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_pspec_args typedOther = (add_partitions_pspec_args)other; lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(typedOther.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, typedOther.new_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_pspec_args("); boolean first = true; sb.append("new_parts:"); if (this.new_parts == null) { sb.append("null"); } else { sb.append(this.new_parts); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { public add_partitions_pspec_argsStandardScheme getScheme() { return new add_partitions_pspec_argsStandardScheme(); } } private static class add_partitions_pspec_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NEW_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list630 = iprot.readListBegin(); struct.new_parts = new ArrayList(_list630.size); for (int _i631 = 0; _i631 < _list630.size; ++_i631) { PartitionSpec _elem632; // optional _elem632 = new PartitionSpec(); _elem632.read(iprot); struct.new_parts.add(_elem632); } iprot.readListEnd(); } struct.setNew_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_pspec_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.new_parts != null) { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); for (PartitionSpec _iter633 : struct.new_parts) { _iter633.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { public add_partitions_pspec_argsTupleScheme getScheme() { return new add_partitions_pspec_argsTupleScheme(); } } private static class add_partitions_pspec_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNew_parts()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNew_parts()) { { oprot.writeI32(struct.new_parts.size()); for (PartitionSpec _iter634 : struct.new_parts) { _iter634.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list635 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList(_list635.size); for (int _i636 = 0; _i636 < _list635.size; ++_i636) { PartitionSpec _elem637; // optional _elem637 = new PartitionSpec(); _elem637.read(iprot); struct.new_parts.add(_elem637); } } struct.setNew_partsIsSet(true); } } } } public static class add_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_pspec_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_pspec_resultTupleSchemeFactory()); } private int success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_partitions_pspec_result.class, metaDataMap); } public add_partitions_pspec_result() { } public add_partitions_pspec_result( int success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_partitions_pspec_result(add_partitions_pspec_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_partitions_pspec_result deepCopy() { return new add_partitions_pspec_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccess() { return this.success; } public void setSuccess(int success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_pspec_result) return this.equals((add_partitions_pspec_result)that); return false; } public boolean equals(add_partitions_pspec_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_partitions_pspec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_pspec_result typedOther = (add_partitions_pspec_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_pspec_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_pspec_resultStandardSchemeFactory implements SchemeFactory { public add_partitions_pspec_resultStandardScheme getScheme() { return new add_partitions_pspec_resultStandardScheme(); } } private static class add_partitions_pspec_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_pspec_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_pspec_resultTupleSchemeFactory implements SchemeFactory { public add_partitions_pspec_resultTupleScheme getScheme() { return new add_partitions_pspec_resultTupleScheme(); } } private static class add_partitions_pspec_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class append_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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(append_partition_args.class, metaDataMap); } public append_partition_args() { } public append_partition_args( String db_name, String tbl_name, List part_vals) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } /** * Performs a deep copy on other. */ public append_partition_args(append_partition_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } } public append_partition_args deepCopy() { return new append_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_args) return this.equals((append_partition_args)that); return false; } public boolean equals(append_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); return builder.toHashCode(); } public int compareTo(append_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_args typedOther = (append_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_argsStandardSchemeFactory implements SchemeFactory { public append_partition_argsStandardScheme getScheme() { return new append_partition_argsStandardScheme(); } } private static class append_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list638 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list638.size); for (int _i639 = 0; _i639 < _list638.size; ++_i639) { String _elem640; // optional _elem640 = iprot.readString(); struct.part_vals.add(_elem640); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter641 : struct.part_vals) { oprot.writeString(_iter641); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_argsTupleSchemeFactory implements SchemeFactory { public append_partition_argsTupleScheme getScheme() { return new append_partition_argsTupleScheme(); } } private static class append_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter642 : struct.part_vals) { oprot.writeString(_iter642); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list643 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list643.size); for (int _i644 = 0; _i644 < _list643.size; ++_i644) { String _elem645; // optional _elem645 = iprot.readString(); struct.part_vals.add(_elem645); } } struct.setPart_valsIsSet(true); } } } } public static class append_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(append_partition_result.class, metaDataMap); } public append_partition_result() { } public append_partition_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public append_partition_result(append_partition_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public append_partition_result deepCopy() { return new append_partition_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_result) return this.equals((append_partition_result)that); return false; } public boolean equals(append_partition_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(append_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_result typedOther = (append_partition_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_resultStandardSchemeFactory implements SchemeFactory { public append_partition_resultStandardScheme getScheme() { return new append_partition_resultStandardScheme(); } } private static class append_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_resultTupleSchemeFactory implements SchemeFactory { public append_partition_resultTupleScheme getScheme() { return new append_partition_resultTupleScheme(); } } private static class append_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class add_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_req_argsTupleSchemeFactory()); } private AddPartitionsRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPartitionsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_req_args.class, metaDataMap); } public add_partitions_req_args() { } public add_partitions_req_args( AddPartitionsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public add_partitions_req_args(add_partitions_req_args other) { if (other.isSetRequest()) { this.request = new AddPartitionsRequest(other.request); } } public add_partitions_req_args deepCopy() { return new add_partitions_req_args(this); } @Override public void clear() { this.request = null; } public AddPartitionsRequest getRequest() { return this.request; } public void setRequest(AddPartitionsRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((AddPartitionsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_req_args) return this.equals((add_partitions_req_args)that); return false; } public boolean equals(add_partitions_req_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(add_partitions_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_req_args typedOther = (add_partitions_req_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_req_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_req_argsStandardSchemeFactory implements SchemeFactory { public add_partitions_req_argsStandardScheme getScheme() { return new add_partitions_req_argsStandardScheme(); } } private static class add_partitions_req_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new AddPartitionsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_req_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_req_argsTupleSchemeFactory implements SchemeFactory { public add_partitions_req_argsTupleScheme getScheme() { return new add_partitions_req_argsTupleScheme(); } } private static class add_partitions_req_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new AddPartitionsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class add_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_req_resultTupleSchemeFactory()); } private AddPartitionsResult success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, AddPartitionsResult.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_partitions_req_result.class, metaDataMap); } public add_partitions_req_result() { } public add_partitions_req_result( AddPartitionsResult success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_partitions_req_result(add_partitions_req_result other) { if (other.isSetSuccess()) { this.success = new AddPartitionsResult(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_partitions_req_result deepCopy() { return new add_partitions_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public AddPartitionsResult getSuccess() { return this.success; } public void setSuccess(AddPartitionsResult 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((AddPartitionsResult)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_req_result) return this.equals((add_partitions_req_result)that); return false; } public boolean equals(add_partitions_req_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_partitions_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_req_result typedOther = (add_partitions_req_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_partitions_req_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_partitions_req_resultStandardSchemeFactory implements SchemeFactory { public add_partitions_req_resultStandardScheme getScheme() { return new add_partitions_req_resultStandardScheme(); } } private static class add_partitions_req_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new AddPartitionsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_partitions_req_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_partitions_req_resultTupleSchemeFactory implements SchemeFactory { public add_partitions_req_resultTupleScheme getScheme() { return new add_partitions_req_resultTupleScheme(); } } private static class add_partitions_req_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new AddPartitionsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class append_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_with_environment_context_args.class, metaDataMap); } public append_partition_with_environment_context_args() { } public append_partition_with_environment_context_args( String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public append_partition_with_environment_context_args(append_partition_with_environment_context_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public append_partition_with_environment_context_args deepCopy() { return new append_partition_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_with_environment_context_args) return this.equals((append_partition_with_environment_context_args)that); return false; } public boolean equals(append_partition_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(append_partition_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_with_environment_context_args typedOther = (append_partition_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public append_partition_with_environment_context_argsStandardScheme getScheme() { return new append_partition_with_environment_context_argsStandardScheme(); } } private static class append_partition_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list646 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list646.size); for (int _i647 = 0; _i647 < _list646.size; ++_i647) { String _elem648; // optional _elem648 = iprot.readString(); struct.part_vals.add(_elem648); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter649 : struct.part_vals) { oprot.writeString(_iter649); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public append_partition_with_environment_context_argsTupleScheme getScheme() { return new append_partition_with_environment_context_argsTupleScheme(); } } private static class append_partition_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetEnvironment_context()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter650 : struct.part_vals) { oprot.writeString(_iter650); } } } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list651 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list651.size); for (int _i652 = 0; _i652 < _list651.size; ++_i652) { String _elem653; // optional _elem653 = iprot.readString(); struct.part_vals.add(_elem653); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class append_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_with_environment_context_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(append_partition_with_environment_context_result.class, metaDataMap); } public append_partition_with_environment_context_result() { } public append_partition_with_environment_context_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public append_partition_with_environment_context_result(append_partition_with_environment_context_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public append_partition_with_environment_context_result deepCopy() { return new append_partition_with_environment_context_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_with_environment_context_result) return this.equals((append_partition_with_environment_context_result)that); return false; } public boolean equals(append_partition_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(append_partition_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_with_environment_context_result typedOther = (append_partition_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_with_environment_context_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public append_partition_with_environment_context_resultStandardScheme getScheme() { return new append_partition_with_environment_context_resultStandardScheme(); } } private static class append_partition_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public append_partition_with_environment_context_resultTupleScheme getScheme() { return new append_partition_with_environment_context_resultTupleScheme(); } } private static class append_partition_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class append_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_by_name_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_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(append_partition_by_name_args.class, metaDataMap); } public append_partition_by_name_args() { } public append_partition_by_name_args( String db_name, String tbl_name, String part_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; } /** * Performs a deep copy on other. */ public append_partition_by_name_args(append_partition_by_name_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } } public append_partition_by_name_args deepCopy() { return new append_partition_by_name_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_by_name_args) return this.equals((append_partition_by_name_args)that); return false; } public boolean equals(append_partition_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); return builder.toHashCode(); } public int compareTo(append_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_args typedOther = (append_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_by_name_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { public append_partition_by_name_argsStandardScheme getScheme() { return new append_partition_by_name_argsStandardScheme(); } } private static class append_partition_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { public append_partition_by_name_argsTupleScheme getScheme() { return new append_partition_by_name_argsTupleScheme(); } } private static class append_partition_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } } } } public static class append_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_by_name_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(append_partition_by_name_result.class, metaDataMap); } public append_partition_by_name_result() { } public append_partition_by_name_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public append_partition_by_name_result(append_partition_by_name_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public append_partition_by_name_result deepCopy() { return new append_partition_by_name_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_by_name_result) return this.equals((append_partition_by_name_result)that); return false; } public boolean equals(append_partition_by_name_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(append_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_result typedOther = (append_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_by_name_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { public append_partition_by_name_resultStandardScheme getScheme() { return new append_partition_by_name_resultStandardScheme(); } } private static class append_partition_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { public append_partition_by_name_resultTupleScheme getScheme() { return new append_partition_by_name_resultTupleScheme(); } } private static class append_partition_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class append_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_by_name_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_name; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_NAME; case 4: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_with_environment_context_args.class, metaDataMap); } public append_partition_by_name_with_environment_context_args() { } public append_partition_by_name_with_environment_context_args( String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public append_partition_by_name_with_environment_context_args(append_partition_by_name_with_environment_context_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public append_partition_by_name_with_environment_context_args deepCopy() { return new append_partition_by_name_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_by_name_with_environment_context_args) return this.equals((append_partition_by_name_with_environment_context_args)that); return false; } public boolean equals(append_partition_by_name_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(append_partition_by_name_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_with_environment_context_args typedOther = (append_partition_by_name_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_by_name_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_by_name_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public append_partition_by_name_with_environment_context_argsStandardScheme getScheme() { return new append_partition_by_name_with_environment_context_argsStandardScheme(); } } private static class append_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public append_partition_by_name_with_environment_context_argsTupleScheme getScheme() { return new append_partition_by_name_with_environment_context_argsTupleScheme(); } } private static class append_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } if (struct.isSetEnvironment_context()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class append_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new append_partition_by_name_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_resultTupleSchemeFactory()); } private Partition success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(append_partition_by_name_with_environment_context_result.class, metaDataMap); } public append_partition_by_name_with_environment_context_result() { } public append_partition_by_name_with_environment_context_result( Partition success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public append_partition_by_name_with_environment_context_result(append_partition_by_name_with_environment_context_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public append_partition_by_name_with_environment_context_result deepCopy() { return new append_partition_by_name_with_environment_context_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof append_partition_by_name_with_environment_context_result) return this.equals((append_partition_by_name_with_environment_context_result)that); return false; } public boolean equals(append_partition_by_name_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(append_partition_by_name_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_with_environment_context_result typedOther = (append_partition_by_name_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("append_partition_by_name_with_environment_context_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class append_partition_by_name_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public append_partition_by_name_with_environment_context_resultStandardScheme getScheme() { return new append_partition_by_name_with_environment_context_resultStandardScheme(); } } private static class append_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, append_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class append_partition_by_name_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public append_partition_by_name_with_environment_context_resultTupleScheme getScheme() { return new append_partition_by_name_with_environment_context_resultTupleScheme(); } } private static class append_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class drop_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private boolean deleteData; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), DELETE_DATA((short)4, "deleteData"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // DELETE_DATA return DELETE_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", 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(drop_partition_args.class, metaDataMap); } public drop_partition_args() { } public drop_partition_args( String db_name, String tbl_name, List part_vals, boolean deleteData) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.deleteData = deleteData; setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_partition_args(drop_partition_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.deleteData = other.deleteData; } public drop_partition_args deepCopy() { return new drop_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; setDeleteDataIsSet(false); this.deleteData = false; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_args) return this.equals((drop_partition_args)that); return false; } public boolean equals(drop_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); return builder.toHashCode(); } public int compareTo(drop_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_args typedOther = (drop_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_argsStandardSchemeFactory implements SchemeFactory { public drop_partition_argsStandardScheme getScheme() { return new drop_partition_argsStandardScheme(); } } private static class drop_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list654 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list654.size); for (int _i655 = 0; _i655 < _list654.size; ++_i655) { String _elem656; // optional _elem656 = iprot.readString(); struct.part_vals.add(_elem656); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter657 : struct.part_vals) { oprot.writeString(_iter657); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_argsTupleSchemeFactory implements SchemeFactory { public drop_partition_argsTupleScheme getScheme() { return new drop_partition_argsTupleScheme(); } } private static class drop_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetDeleteData()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter658 : struct.part_vals) { oprot.writeString(_iter658); } } } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list659 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list659.size); for (int _i660 = 0; _i660 < _list659.size; ++_i660) { String _elem661; // optional _elem661 = iprot.readString(); struct.part_vals.add(_elem661); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } } } } public static class drop_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_partition_result.class, metaDataMap); } public drop_partition_result() { } public drop_partition_result( boolean success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_partition_result(drop_partition_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_partition_result deepCopy() { return new drop_partition_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_result) return this.equals((drop_partition_result)that); return false; } public boolean equals(drop_partition_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_result typedOther = (drop_partition_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_resultStandardSchemeFactory implements SchemeFactory { public drop_partition_resultStandardScheme getScheme() { return new drop_partition_resultStandardScheme(); } } private static class drop_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_resultTupleSchemeFactory implements SchemeFactory { public drop_partition_resultTupleScheme getScheme() { return new drop_partition_resultTupleScheme(); } } private static class drop_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private boolean deleteData; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), DELETE_DATA((short)4, "deleteData"), ENVIRONMENT_CONTEXT((short)5, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // DELETE_DATA return DELETE_DATA; case 5: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_with_environment_context_args.class, metaDataMap); } public drop_partition_with_environment_context_args() { } public drop_partition_with_environment_context_args( String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.deleteData = deleteData; setDeleteDataIsSet(true); this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public drop_partition_with_environment_context_args(drop_partition_with_environment_context_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.deleteData = other.deleteData; if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public drop_partition_with_environment_context_args deepCopy() { return new drop_partition_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; setDeleteDataIsSet(false); this.deleteData = false; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case DELETE_DATA: return isSetDeleteData(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_with_environment_context_args) return this.equals((drop_partition_with_environment_context_args)that); return false; } public boolean equals(drop_partition_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(drop_partition_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_with_environment_context_args typedOther = (drop_partition_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public drop_partition_with_environment_context_argsStandardScheme getScheme() { return new drop_partition_with_environment_context_argsStandardScheme(); } } private static class drop_partition_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list662 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list662.size); for (int _i663 = 0; _i663 < _list662.size; ++_i663) { String _elem664; // optional _elem664 = iprot.readString(); struct.part_vals.add(_elem664); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter665 : struct.part_vals) { oprot.writeString(_iter665); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public drop_partition_with_environment_context_argsTupleScheme getScheme() { return new drop_partition_with_environment_context_argsTupleScheme(); } } private static class drop_partition_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetDeleteData()) { optionals.set(3); } if (struct.isSetEnvironment_context()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter666 : struct.part_vals) { oprot.writeString(_iter666); } } } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list667 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list667.size); for (int _i668 = 0; _i668 < _list667.size; ++_i668) { String _elem669; // optional _elem669 = iprot.readString(); struct.part_vals.add(_elem669); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } if (incoming.get(4)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class drop_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_with_environment_context_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_partition_with_environment_context_result.class, metaDataMap); } public drop_partition_with_environment_context_result() { } public drop_partition_with_environment_context_result( boolean success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_partition_with_environment_context_result(drop_partition_with_environment_context_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_partition_with_environment_context_result deepCopy() { return new drop_partition_with_environment_context_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_with_environment_context_result) return this.equals((drop_partition_with_environment_context_result)that); return false; } public boolean equals(drop_partition_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_partition_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_with_environment_context_result typedOther = (drop_partition_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_with_environment_context_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public drop_partition_with_environment_context_resultStandardScheme getScheme() { return new drop_partition_with_environment_context_resultStandardScheme(); } } private static class drop_partition_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public drop_partition_with_environment_context_resultTupleScheme getScheme() { return new drop_partition_with_environment_context_resultTupleScheme(); } } private static class drop_partition_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_by_name_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_name; // required private boolean deleteData; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"), DELETE_DATA((short)4, "deleteData"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_NAME; case 4: // DELETE_DATA return DELETE_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", 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(drop_partition_by_name_args.class, metaDataMap); } public drop_partition_by_name_args() { } public drop_partition_by_name_args( String db_name, String tbl_name, String part_name, boolean deleteData) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.deleteData = deleteData; setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_partition_by_name_args(drop_partition_by_name_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } this.deleteData = other.deleteData; } public drop_partition_by_name_args deepCopy() { return new drop_partition_by_name_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; setDeleteDataIsSet(false); this.deleteData = false; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_args) return this.equals((drop_partition_by_name_args)that); return false; } public boolean equals(drop_partition_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); return builder.toHashCode(); } public int compareTo(drop_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { public drop_partition_by_name_argsStandardScheme getScheme() { return new drop_partition_by_name_argsStandardScheme(); } } private static class drop_partition_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { public drop_partition_by_name_argsTupleScheme getScheme() { return new drop_partition_by_name_argsTupleScheme(); } } private static class drop_partition_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } if (struct.isSetDeleteData()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } if (incoming.get(3)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } } } } public static class drop_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_by_name_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_partition_by_name_result.class, metaDataMap); } public drop_partition_by_name_result() { } public drop_partition_by_name_result( boolean success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_partition_by_name_result(drop_partition_by_name_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_partition_by_name_result deepCopy() { return new drop_partition_by_name_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_result) return this.equals((drop_partition_by_name_result)that); return false; } public boolean equals(drop_partition_by_name_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { public drop_partition_by_name_resultStandardScheme getScheme() { return new drop_partition_by_name_resultStandardScheme(); } } private static class drop_partition_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { public drop_partition_by_name_resultTupleScheme getScheme() { return new drop_partition_by_name_resultTupleScheme(); } } private static class drop_partition_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_by_name_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_name; // required private boolean deleteData; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"), DELETE_DATA((short)4, "deleteData"), ENVIRONMENT_CONTEXT((short)5, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_NAME; case 4: // DELETE_DATA return DELETE_DATA; case 5: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_with_environment_context_args.class, metaDataMap); } public drop_partition_by_name_with_environment_context_args() { } public drop_partition_by_name_with_environment_context_args( String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.deleteData = deleteData; setDeleteDataIsSet(true); this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public drop_partition_by_name_with_environment_context_args(drop_partition_by_name_with_environment_context_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } this.deleteData = other.deleteData; if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public drop_partition_by_name_with_environment_context_args deepCopy() { return new drop_partition_by_name_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; setDeleteDataIsSet(false); this.deleteData = false; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case DELETE_DATA: return isSetDeleteData(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_with_environment_context_args) return this.equals((drop_partition_by_name_with_environment_context_args)that); return false; } public boolean equals(drop_partition_by_name_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(drop_partition_by_name_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_with_environment_context_args typedOther = (drop_partition_by_name_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_by_name_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_by_name_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public drop_partition_by_name_with_environment_context_argsStandardScheme getScheme() { return new drop_partition_by_name_with_environment_context_argsStandardScheme(); } } private static class drop_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public drop_partition_by_name_with_environment_context_argsTupleScheme getScheme() { return new drop_partition_by_name_with_environment_context_argsTupleScheme(); } } private static class drop_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } if (struct.isSetDeleteData()) { optionals.set(3); } if (struct.isSetEnvironment_context()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } if (incoming.get(3)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } if (incoming.get(4)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class drop_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partition_by_name_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_partition_by_name_with_environment_context_result.class, metaDataMap); } public drop_partition_by_name_with_environment_context_result() { } public drop_partition_by_name_with_environment_context_result( boolean success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_partition_by_name_with_environment_context_result(drop_partition_by_name_with_environment_context_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_partition_by_name_with_environment_context_result deepCopy() { return new drop_partition_by_name_with_environment_context_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_with_environment_context_result) return this.equals((drop_partition_by_name_with_environment_context_result)that); return false; } public boolean equals(drop_partition_by_name_with_environment_context_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_partition_by_name_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_with_environment_context_result typedOther = (drop_partition_by_name_with_environment_context_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partition_by_name_with_environment_context_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partition_by_name_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public drop_partition_by_name_with_environment_context_resultStandardScheme getScheme() { return new drop_partition_by_name_with_environment_context_resultStandardScheme(); } } private static class drop_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partition_by_name_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public drop_partition_by_name_with_environment_context_resultTupleScheme getScheme() { return new drop_partition_by_name_with_environment_context_resultTupleScheme(); } } private static class drop_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partitions_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partitions_req_argsTupleSchemeFactory()); } private DropPartitionsRequest req; // 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 { REQ((short)1, "req"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQ return REQ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partitions_req_args.class, metaDataMap); } public drop_partitions_req_args() { } public drop_partitions_req_args( DropPartitionsRequest req) { this(); this.req = req; } /** * Performs a deep copy on other. */ public drop_partitions_req_args(drop_partitions_req_args other) { if (other.isSetReq()) { this.req = new DropPartitionsRequest(other.req); } } public drop_partitions_req_args deepCopy() { return new drop_partitions_req_args(this); } @Override public void clear() { this.req = null; } public DropPartitionsRequest getReq() { return this.req; } public void setReq(DropPartitionsRequest req) { this.req = req; } public void unsetReq() { this.req = null; } /** Returns true if field req is set (has been assigned a value) and false otherwise */ public boolean isSetReq() { return this.req != null; } public void setReqIsSet(boolean value) { if (!value) { this.req = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQ: if (value == null) { unsetReq(); } else { setReq((DropPartitionsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQ: return getReq(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQ: return isSetReq(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partitions_req_args) return this.equals((drop_partitions_req_args)that); return false; } public boolean equals(drop_partitions_req_args that) { if (that == null) return false; boolean this_present_req = true && this.isSetReq(); boolean that_present_req = true && that.isSetReq(); if (this_present_req || that_present_req) { if (!(this_present_req && that_present_req)) return false; if (!this.req.equals(that.req)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_req = true && (isSetReq()); builder.append(present_req); if (present_req) builder.append(req); return builder.toHashCode(); } public int compareTo(drop_partitions_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partitions_req_args typedOther = (drop_partitions_req_args)other; lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partitions_req_args("); boolean first = true; sb.append("req:"); if (this.req == null) { sb.append("null"); } else { sb.append(this.req); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (req != null) { req.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partitions_req_argsStandardSchemeFactory implements SchemeFactory { public drop_partitions_req_argsStandardScheme getScheme() { return new drop_partitions_req_argsStandardScheme(); } } private static class drop_partitions_req_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.req = new DropPartitionsRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partitions_req_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.req != null) { oprot.writeFieldBegin(REQ_FIELD_DESC); struct.req.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partitions_req_argsTupleSchemeFactory implements SchemeFactory { public drop_partitions_req_argsTupleScheme getScheme() { return new drop_partitions_req_argsTupleScheme(); } } private static class drop_partitions_req_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetReq()) { struct.req.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new DropPartitionsRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class drop_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_partitions_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_partitions_req_resultTupleSchemeFactory()); } private DropPartitionsResult success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, DropPartitionsResult.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_partitions_req_result.class, metaDataMap); } public drop_partitions_req_result() { } public drop_partitions_req_result( DropPartitionsResult success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_partitions_req_result(drop_partitions_req_result other) { if (other.isSetSuccess()) { this.success = new DropPartitionsResult(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_partitions_req_result deepCopy() { return new drop_partitions_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public DropPartitionsResult getSuccess() { return this.success; } public void setSuccess(DropPartitionsResult 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((DropPartitionsResult)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partitions_req_result) return this.equals((drop_partitions_req_result)that); return false; } public boolean equals(drop_partitions_req_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_partitions_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partitions_req_result typedOther = (drop_partitions_req_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_partitions_req_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_partitions_req_resultStandardSchemeFactory implements SchemeFactory { public drop_partitions_req_resultStandardScheme getScheme() { return new drop_partitions_req_resultStandardScheme(); } } private static class drop_partitions_req_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new DropPartitionsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_partitions_req_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_partitions_req_resultTupleSchemeFactory implements SchemeFactory { public drop_partitions_req_resultTupleScheme getScheme() { return new drop_partitions_req_resultTupleScheme(); } } private static class drop_partitions_req_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new DropPartitionsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } public get_partition_args() { } public get_partition_args( String db_name, String tbl_name, List part_vals) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } /** * Performs a deep copy on other. */ public get_partition_args(get_partition_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } } public get_partition_args deepCopy() { return new get_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_args) return this.equals((get_partition_args)that); return false; } public boolean equals(get_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); return builder.toHashCode(); } public int compareTo(get_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_args typedOther = (get_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_argsStandardSchemeFactory implements SchemeFactory { public get_partition_argsStandardScheme getScheme() { return new get_partition_argsStandardScheme(); } } private static class get_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list670 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list670.size); for (int _i671 = 0; _i671 < _list670.size; ++_i671) { String _elem672; // optional _elem672 = iprot.readString(); struct.part_vals.add(_elem672); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter673 : struct.part_vals) { oprot.writeString(_iter673); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_argsTupleSchemeFactory implements SchemeFactory { public get_partition_argsTupleScheme getScheme() { return new get_partition_argsTupleScheme(); } } private static class get_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter674 : struct.part_vals) { oprot.writeString(_iter674); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list675 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list675.size); for (int _i676 = 0; _i676 < _list675.size; ++_i676) { String _elem677; // optional _elem677 = iprot.readString(); struct.part_vals.add(_elem677); } } struct.setPart_valsIsSet(true); } } } } public static class get_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_resultTupleSchemeFactory()); } private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); } public get_partition_result() { } public get_partition_result( Partition success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partition_result(get_partition_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partition_result deepCopy() { return new get_partition_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_result) return this.equals((get_partition_result)that); return false; } public boolean equals(get_partition_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_result typedOther = (get_partition_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_resultStandardSchemeFactory implements SchemeFactory { public get_partition_resultStandardScheme getScheme() { return new get_partition_resultStandardScheme(); } } private static class get_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_resultTupleSchemeFactory implements SchemeFactory { public get_partition_resultTupleScheme getScheme() { return new get_partition_resultTupleScheme(); } } private static class get_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class exchange_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_args"); private static final org.apache.thrift.protocol.TField PARTITION_SPECS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionSpecs", org.apache.thrift.protocol.TType.MAP, (short)1); private static final org.apache.thrift.protocol.TField SOURCE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("source_db", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField SOURCE_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_table_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DEST_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_db", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_table_name", org.apache.thrift.protocol.TType.STRING, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new exchange_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new exchange_partition_argsTupleSchemeFactory()); } private Map partitionSpecs; // required private String source_db; // required private String source_table_name; // required private String dest_db; // required private String dest_table_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 { PARTITION_SPECS((short)1, "partitionSpecs"), SOURCE_DB((short)2, "source_db"), SOURCE_TABLE_NAME((short)3, "source_table_name"), DEST_DB((short)4, "dest_db"), DEST_TABLE_NAME((short)5, "dest_table_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PARTITION_SPECS return PARTITION_SPECS; case 2: // SOURCE_DB return SOURCE_DB; case 3: // SOURCE_TABLE_NAME return SOURCE_TABLE_NAME; case 4: // DEST_DB return DEST_DB; case 5: // DEST_TABLE_NAME return DEST_TABLE_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.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", 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)))); tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_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(exchange_partition_args.class, metaDataMap); } public exchange_partition_args() { } public exchange_partition_args( Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) { this(); this.partitionSpecs = partitionSpecs; this.source_db = source_db; this.source_table_name = source_table_name; this.dest_db = dest_db; this.dest_table_name = dest_table_name; } /** * Performs a deep copy on other. */ public exchange_partition_args(exchange_partition_args other) { if (other.isSetPartitionSpecs()) { Map __this__partitionSpecs = new HashMap(); for (Map.Entry other_element : other.partitionSpecs.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__partitionSpecs_copy_key = other_element_key; String __this__partitionSpecs_copy_value = other_element_value; __this__partitionSpecs.put(__this__partitionSpecs_copy_key, __this__partitionSpecs_copy_value); } this.partitionSpecs = __this__partitionSpecs; } if (other.isSetSource_db()) { this.source_db = other.source_db; } if (other.isSetSource_table_name()) { this.source_table_name = other.source_table_name; } if (other.isSetDest_db()) { this.dest_db = other.dest_db; } if (other.isSetDest_table_name()) { this.dest_table_name = other.dest_table_name; } } public exchange_partition_args deepCopy() { return new exchange_partition_args(this); } @Override public void clear() { this.partitionSpecs = null; this.source_db = null; this.source_table_name = null; this.dest_db = null; this.dest_table_name = null; } public int getPartitionSpecsSize() { return (this.partitionSpecs == null) ? 0 : this.partitionSpecs.size(); } public void putToPartitionSpecs(String key, String val) { if (this.partitionSpecs == null) { this.partitionSpecs = new HashMap(); } this.partitionSpecs.put(key, val); } public Map getPartitionSpecs() { return this.partitionSpecs; } public void setPartitionSpecs(Map partitionSpecs) { this.partitionSpecs = partitionSpecs; } public void unsetPartitionSpecs() { this.partitionSpecs = null; } /** Returns true if field partitionSpecs is set (has been assigned a value) and false otherwise */ public boolean isSetPartitionSpecs() { return this.partitionSpecs != null; } public void setPartitionSpecsIsSet(boolean value) { if (!value) { this.partitionSpecs = null; } } public String getSource_db() { return this.source_db; } public void setSource_db(String source_db) { this.source_db = source_db; } public void unsetSource_db() { this.source_db = null; } /** Returns true if field source_db is set (has been assigned a value) and false otherwise */ public boolean isSetSource_db() { return this.source_db != null; } public void setSource_dbIsSet(boolean value) { if (!value) { this.source_db = null; } } public String getSource_table_name() { return this.source_table_name; } public void setSource_table_name(String source_table_name) { this.source_table_name = source_table_name; } public void unsetSource_table_name() { this.source_table_name = null; } /** Returns true if field source_table_name is set (has been assigned a value) and false otherwise */ public boolean isSetSource_table_name() { return this.source_table_name != null; } public void setSource_table_nameIsSet(boolean value) { if (!value) { this.source_table_name = null; } } public String getDest_db() { return this.dest_db; } public void setDest_db(String dest_db) { this.dest_db = dest_db; } public void unsetDest_db() { this.dest_db = null; } /** Returns true if field dest_db is set (has been assigned a value) and false otherwise */ public boolean isSetDest_db() { return this.dest_db != null; } public void setDest_dbIsSet(boolean value) { if (!value) { this.dest_db = null; } } public String getDest_table_name() { return this.dest_table_name; } public void setDest_table_name(String dest_table_name) { this.dest_table_name = dest_table_name; } public void unsetDest_table_name() { this.dest_table_name = null; } /** Returns true if field dest_table_name is set (has been assigned a value) and false otherwise */ public boolean isSetDest_table_name() { return this.dest_table_name != null; } public void setDest_table_nameIsSet(boolean value) { if (!value) { this.dest_table_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PARTITION_SPECS: if (value == null) { unsetPartitionSpecs(); } else { setPartitionSpecs((Map)value); } break; case SOURCE_DB: if (value == null) { unsetSource_db(); } else { setSource_db((String)value); } break; case SOURCE_TABLE_NAME: if (value == null) { unsetSource_table_name(); } else { setSource_table_name((String)value); } break; case DEST_DB: if (value == null) { unsetDest_db(); } else { setDest_db((String)value); } break; case DEST_TABLE_NAME: if (value == null) { unsetDest_table_name(); } else { setDest_table_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PARTITION_SPECS: return getPartitionSpecs(); case SOURCE_DB: return getSource_db(); case SOURCE_TABLE_NAME: return getSource_table_name(); case DEST_DB: return getDest_db(); case DEST_TABLE_NAME: return getDest_table_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PARTITION_SPECS: return isSetPartitionSpecs(); case SOURCE_DB: return isSetSource_db(); case SOURCE_TABLE_NAME: return isSetSource_table_name(); case DEST_DB: return isSetDest_db(); case DEST_TABLE_NAME: return isSetDest_table_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof exchange_partition_args) return this.equals((exchange_partition_args)that); return false; } public boolean equals(exchange_partition_args that) { if (that == null) return false; boolean this_present_partitionSpecs = true && this.isSetPartitionSpecs(); boolean that_present_partitionSpecs = true && that.isSetPartitionSpecs(); if (this_present_partitionSpecs || that_present_partitionSpecs) { if (!(this_present_partitionSpecs && that_present_partitionSpecs)) return false; if (!this.partitionSpecs.equals(that.partitionSpecs)) return false; } boolean this_present_source_db = true && this.isSetSource_db(); boolean that_present_source_db = true && that.isSetSource_db(); if (this_present_source_db || that_present_source_db) { if (!(this_present_source_db && that_present_source_db)) return false; if (!this.source_db.equals(that.source_db)) return false; } boolean this_present_source_table_name = true && this.isSetSource_table_name(); boolean that_present_source_table_name = true && that.isSetSource_table_name(); if (this_present_source_table_name || that_present_source_table_name) { if (!(this_present_source_table_name && that_present_source_table_name)) return false; if (!this.source_table_name.equals(that.source_table_name)) return false; } boolean this_present_dest_db = true && this.isSetDest_db(); boolean that_present_dest_db = true && that.isSetDest_db(); if (this_present_dest_db || that_present_dest_db) { if (!(this_present_dest_db && that_present_dest_db)) return false; if (!this.dest_db.equals(that.dest_db)) return false; } boolean this_present_dest_table_name = true && this.isSetDest_table_name(); boolean that_present_dest_table_name = true && that.isSetDest_table_name(); if (this_present_dest_table_name || that_present_dest_table_name) { if (!(this_present_dest_table_name && that_present_dest_table_name)) return false; if (!this.dest_table_name.equals(that.dest_table_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_partitionSpecs = true && (isSetPartitionSpecs()); builder.append(present_partitionSpecs); if (present_partitionSpecs) builder.append(partitionSpecs); boolean present_source_db = true && (isSetSource_db()); builder.append(present_source_db); if (present_source_db) builder.append(source_db); boolean present_source_table_name = true && (isSetSource_table_name()); builder.append(present_source_table_name); if (present_source_table_name) builder.append(source_table_name); boolean present_dest_db = true && (isSetDest_db()); builder.append(present_dest_db); if (present_dest_db) builder.append(dest_db); boolean present_dest_table_name = true && (isSetDest_table_name()); builder.append(present_dest_table_name); if (present_dest_table_name) builder.append(dest_table_name); return builder.toHashCode(); } public int compareTo(exchange_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; exchange_partition_args typedOther = (exchange_partition_args)other; lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(typedOther.isSetPartitionSpecs()); if (lastComparison != 0) { return lastComparison; } if (isSetPartitionSpecs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, typedOther.partitionSpecs); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(typedOther.isSetSource_db()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, typedOther.source_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(typedOther.isSetSource_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, typedOther.source_table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(typedOther.isSetDest_db()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, typedOther.dest_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(typedOther.isSetDest_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, typedOther.dest_table_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("exchange_partition_args("); boolean first = true; sb.append("partitionSpecs:"); if (this.partitionSpecs == null) { sb.append("null"); } else { sb.append(this.partitionSpecs); } first = false; if (!first) sb.append(", "); sb.append("source_db:"); if (this.source_db == null) { sb.append("null"); } else { sb.append(this.source_db); } first = false; if (!first) sb.append(", "); sb.append("source_table_name:"); if (this.source_table_name == null) { sb.append("null"); } else { sb.append(this.source_table_name); } first = false; if (!first) sb.append(", "); sb.append("dest_db:"); if (this.dest_db == null) { sb.append("null"); } else { sb.append(this.dest_db); } first = false; if (!first) sb.append(", "); sb.append("dest_table_name:"); if (this.dest_table_name == null) { sb.append("null"); } else { sb.append(this.dest_table_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class exchange_partition_argsStandardSchemeFactory implements SchemeFactory { public exchange_partition_argsStandardScheme getScheme() { return new exchange_partition_argsStandardScheme(); } } private static class exchange_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PARTITION_SPECS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map678 = iprot.readMapBegin(); struct.partitionSpecs = new HashMap(2*_map678.size); for (int _i679 = 0; _i679 < _map678.size; ++_i679) { String _key680; // required String _val681; // required _key680 = iprot.readString(); _val681 = iprot.readString(); struct.partitionSpecs.put(_key680, _val681); } iprot.readMapEnd(); } struct.setPartitionSpecsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SOURCE_DB if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.source_db = iprot.readString(); struct.setSource_dbIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SOURCE_TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.source_table_name = iprot.readString(); struct.setSource_table_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DEST_DB if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dest_db = iprot.readString(); struct.setDest_dbIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DEST_TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dest_table_name = iprot.readString(); struct.setDest_table_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, exchange_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.partitionSpecs != null) { oprot.writeFieldBegin(PARTITION_SPECS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.partitionSpecs.size())); for (Map.Entry _iter682 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter682.getKey()); oprot.writeString(_iter682.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.source_db != null) { oprot.writeFieldBegin(SOURCE_DB_FIELD_DESC); oprot.writeString(struct.source_db); oprot.writeFieldEnd(); } if (struct.source_table_name != null) { oprot.writeFieldBegin(SOURCE_TABLE_NAME_FIELD_DESC); oprot.writeString(struct.source_table_name); oprot.writeFieldEnd(); } if (struct.dest_db != null) { oprot.writeFieldBegin(DEST_DB_FIELD_DESC); oprot.writeString(struct.dest_db); oprot.writeFieldEnd(); } if (struct.dest_table_name != null) { oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC); oprot.writeString(struct.dest_table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class exchange_partition_argsTupleSchemeFactory implements SchemeFactory { public exchange_partition_argsTupleScheme getScheme() { return new exchange_partition_argsTupleScheme(); } } private static class exchange_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPartitionSpecs()) { optionals.set(0); } if (struct.isSetSource_db()) { optionals.set(1); } if (struct.isSetSource_table_name()) { optionals.set(2); } if (struct.isSetDest_db()) { optionals.set(3); } if (struct.isSetDest_table_name()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetPartitionSpecs()) { { oprot.writeI32(struct.partitionSpecs.size()); for (Map.Entry _iter683 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter683.getKey()); oprot.writeString(_iter683.getValue()); } } } if (struct.isSetSource_db()) { oprot.writeString(struct.source_db); } if (struct.isSetSource_table_name()) { oprot.writeString(struct.source_table_name); } if (struct.isSetDest_db()) { oprot.writeString(struct.dest_db); } if (struct.isSetDest_table_name()) { oprot.writeString(struct.dest_table_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map684 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.partitionSpecs = new HashMap(2*_map684.size); for (int _i685 = 0; _i685 < _map684.size; ++_i685) { String _key686; // required String _val687; // required _key686 = iprot.readString(); _val687 = iprot.readString(); struct.partitionSpecs.put(_key686, _val687); } } struct.setPartitionSpecsIsSet(true); } if (incoming.get(1)) { struct.source_db = iprot.readString(); struct.setSource_dbIsSet(true); } if (incoming.get(2)) { struct.source_table_name = iprot.readString(); struct.setSource_table_nameIsSet(true); } if (incoming.get(3)) { struct.dest_db = iprot.readString(); struct.setDest_dbIsSet(true); } if (incoming.get(4)) { struct.dest_table_name = iprot.readString(); struct.setDest_table_nameIsSet(true); } } } } public static class exchange_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new exchange_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new exchange_partition_resultTupleSchemeFactory()); } private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // required private InvalidObjectException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(exchange_partition_result.class, metaDataMap); } public exchange_partition_result() { } public exchange_partition_result( Partition success, MetaException o1, NoSuchObjectException o2, InvalidObjectException o3, InvalidInputException o4) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public exchange_partition_result(exchange_partition_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new InvalidObjectException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public exchange_partition_result deepCopy() { return new exchange_partition_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public InvalidObjectException getO3() { return this.o3; } public void setO3(InvalidObjectException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((InvalidObjectException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof exchange_partition_result) return this.equals((exchange_partition_result)that); return false; } public boolean equals(exchange_partition_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(exchange_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; exchange_partition_result typedOther = (exchange_partition_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("exchange_partition_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class exchange_partition_resultStandardSchemeFactory implements SchemeFactory { public exchange_partition_resultStandardScheme getScheme() { return new exchange_partition_resultStandardScheme(); } } private static class exchange_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, exchange_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class exchange_partition_resultTupleSchemeFactory implements SchemeFactory { public exchange_partition_resultTupleScheme getScheme() { return new exchange_partition_resultTupleScheme(); } } private static class exchange_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class get_partition_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_with_auth_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_with_auth_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private String user_name; // required private List group_names; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), USER_NAME((short)4, "user_name"), GROUP_NAMES((short)5, "group_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // USER_NAME return USER_NAME; case 5: // GROUP_NAMES return GROUP_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap); } public get_partition_with_auth_args() { } public get_partition_with_auth_args( String db_name, String tbl_name, List part_vals, String user_name, List group_names) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on other. */ public get_partition_with_auth_args(get_partition_with_auth_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List __this__group_names = new ArrayList(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partition_with_auth_args deepCopy() { return new get_partition_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator getGroup_namesIterator() { return (this.group_names == null) ? null : this.group_names.iterator(); } public void addToGroup_names(String elem) { if (this.group_names == null) { this.group_names = new ArrayList(); } this.group_names.add(elem); } public List getGroup_names() { return this.group_names; } public void setGroup_names(List group_names) { this.group_names = group_names; } public void unsetGroup_names() { this.group_names = null; } /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ public boolean isSetGroup_names() { return this.group_names != null; } public void setGroup_namesIsSet(boolean value) { if (!value) { this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case USER_NAME: if (value == null) { unsetUser_name(); } else { setUser_name((String)value); } break; case GROUP_NAMES: if (value == null) { unsetGroup_names(); } else { setGroup_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_with_auth_args) return this.equals((get_partition_with_auth_args)that); return false; } public boolean equals(get_partition_with_auth_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_user_name = true && (isSetUser_name()); builder.append(present_user_name); if (present_user_name) builder.append(user_name); boolean present_group_names = true && (isSetGroup_names()); builder.append(present_group_names); if (present_group_names) builder.append(group_names); return builder.toHashCode(); } public int compareTo(get_partition_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_with_auth_args typedOther = (get_partition_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_with_auth_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("user_name:"); if (this.user_name == null) { sb.append("null"); } else { sb.append(this.user_name); } first = false; if (!first) sb.append(", "); sb.append("group_names:"); if (this.group_names == null) { sb.append("null"); } else { sb.append(this.group_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_with_auth_argsStandardSchemeFactory implements SchemeFactory { public get_partition_with_auth_argsStandardScheme getScheme() { return new get_partition_with_auth_argsStandardScheme(); } } private static class get_partition_with_auth_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list688 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list688.size); for (int _i689 = 0; _i689 < _list688.size; ++_i689) { String _elem690; // optional _elem690 = iprot.readString(); struct.part_vals.add(_elem690); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list691 = iprot.readListBegin(); struct.group_names = new ArrayList(_list691.size); for (int _i692 = 0; _i692 < _list691.size; ++_i692) { String _elem693; // optional _elem693 = iprot.readString(); struct.group_names.add(_elem693); } iprot.readListEnd(); } struct.setGroup_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter694 : struct.part_vals) { oprot.writeString(_iter694); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.user_name); oprot.writeFieldEnd(); } if (struct.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); for (String _iter695 : struct.group_names) { oprot.writeString(_iter695); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_with_auth_argsTupleSchemeFactory implements SchemeFactory { public get_partition_with_auth_argsTupleScheme getScheme() { return new get_partition_with_auth_argsTupleScheme(); } } private static class get_partition_with_auth_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetUser_name()) { optionals.set(3); } if (struct.isSetGroup_names()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter696 : struct.part_vals) { oprot.writeString(_iter696); } } } if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter697 : struct.group_names) { oprot.writeString(_iter697); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list698 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list698.size); for (int _i699 = 0; _i699 < _list698.size; ++_i699) { String _elem700; // optional _elem700 = iprot.readString(); struct.part_vals.add(_elem700); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TList _list701 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList(_list701.size); for (int _i702 = 0; _i702 < _list701.size; ++_i702) { String _elem703; // optional _elem703 = iprot.readString(); struct.group_names.add(_elem703); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partition_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_with_auth_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_with_auth_resultTupleSchemeFactory()); } private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); } public get_partition_with_auth_result() { } public get_partition_with_auth_result( Partition success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partition_with_auth_result(get_partition_with_auth_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partition_with_auth_result deepCopy() { return new get_partition_with_auth_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_with_auth_result) return this.equals((get_partition_with_auth_result)that); return false; } public boolean equals(get_partition_with_auth_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partition_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_with_auth_result typedOther = (get_partition_with_auth_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_with_auth_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_with_auth_resultStandardSchemeFactory implements SchemeFactory { public get_partition_with_auth_resultStandardScheme getScheme() { return new get_partition_with_auth_resultStandardScheme(); } } private static class get_partition_with_auth_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_with_auth_resultTupleSchemeFactory implements SchemeFactory { public get_partition_with_auth_resultTupleScheme getScheme() { return new get_partition_with_auth_resultTupleScheme(); } } private static class get_partition_with_auth_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_by_name_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_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(get_partition_by_name_args.class, metaDataMap); } public get_partition_by_name_args() { } public get_partition_by_name_args( String db_name, String tbl_name, String part_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; } /** * Performs a deep copy on other. */ public get_partition_by_name_args(get_partition_by_name_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } } public get_partition_by_name_args deepCopy() { return new get_partition_by_name_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_by_name_args) return this.equals((get_partition_by_name_args)that); return false; } public boolean equals(get_partition_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); return builder.toHashCode(); } public int compareTo(get_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_by_name_args typedOther = (get_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_by_name_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_by_name_argsStandardSchemeFactory implements SchemeFactory { public get_partition_by_name_argsStandardScheme getScheme() { return new get_partition_by_name_argsStandardScheme(); } } private static class get_partition_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_by_name_argsTupleSchemeFactory implements SchemeFactory { public get_partition_by_name_argsTupleScheme getScheme() { return new get_partition_by_name_argsTupleScheme(); } } private static class get_partition_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } } } } public static class get_partition_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_by_name_resultTupleSchemeFactory()); } private Partition success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } public get_partition_by_name_result() { } public get_partition_by_name_result( Partition success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partition_by_name_result(get_partition_by_name_result other) { if (other.isSetSuccess()) { this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partition_by_name_result deepCopy() { return new get_partition_by_name_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Partition getSuccess() { return this.success; } public void setSuccess(Partition 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Partition)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_by_name_result) return this.equals((get_partition_by_name_result)that); return false; } public boolean equals(get_partition_by_name_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_by_name_result typedOther = (get_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_by_name_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_by_name_resultStandardSchemeFactory implements SchemeFactory { public get_partition_by_name_resultStandardScheme getScheme() { return new get_partition_by_name_resultStandardScheme(); } } private static class get_partition_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_by_name_resultTupleSchemeFactory implements SchemeFactory { public get_partition_by_name_resultTupleScheme getScheme() { return new get_partition_by_name_resultTupleScheme(); } } private static class get_partition_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Partition(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private short max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } public get_partitions_args() { this.max_parts = (short)-1; } public get_partitions_args( String db_name, String tbl_name, short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_args(get_partitions_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_parts = other.max_parts; } public get_partitions_args deepCopy() { return new get_partitions_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_args) return this.equals((get_partitions_args)that); return false; } public boolean equals(get_partitions_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_args typedOther = (get_partitions_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_argsStandardScheme getScheme() { return new get_partitions_argsStandardScheme(); } } private static class get_partitions_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_argsTupleScheme getScheme() { return new get_partitions_argsTupleScheme(); } } private static class get_partitions_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_parts()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } } } } public static class get_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_resultTupleSchemeFactory()); } private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); } public get_partitions_result() { } public get_partitions_result( List success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_result(get_partitions_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partitions_result deepCopy() { return new get_partitions_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_result) return this.equals((get_partitions_result)that); return false; } public boolean equals(get_partitions_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_result typedOther = (get_partitions_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_resultStandardScheme getScheme() { return new get_partitions_resultStandardScheme(); } } private static class get_partitions_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list704 = iprot.readListBegin(); struct.success = new ArrayList(_list704.size); for (int _i705 = 0; _i705 < _list704.size; ++_i705) { Partition _elem706; // optional _elem706 = new Partition(); _elem706.read(iprot); struct.success.add(_elem706); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter707 : struct.success) { _iter707.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_resultTupleScheme getScheme() { return new get_partitions_resultTupleScheme(); } } private static class get_partitions_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter708 : struct.success) { _iter708.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list709 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list709.size); for (int _i710 = 0; _i710 < _list709.size; ++_i710) { Partition _elem711; // optional _elem711 = new Partition(); _elem711.read(iprot); struct.success.add(_elem711); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_with_auth_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_with_auth_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private short max_parts; // required private String user_name; // required private List group_names; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_PARTS((short)3, "max_parts"), USER_NAME((short)4, "user_name"), GROUP_NAMES((short)5, "group_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_PARTS return MAX_PARTS; case 4: // USER_NAME return USER_NAME; case 5: // GROUP_NAMES return GROUP_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); } public get_partitions_with_auth_args() { this.max_parts = (short)-1; } public get_partitions_with_auth_args( String db_name, String tbl_name, short max_parts, String user_name, List group_names) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; setMax_partsIsSet(true); this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on other. */ public get_partitions_with_auth_args(get_partitions_with_auth_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_parts = other.max_parts; if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List __this__group_names = new ArrayList(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partitions_with_auth_args deepCopy() { return new get_partitions_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_parts = (short)-1; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator getGroup_namesIterator() { return (this.group_names == null) ? null : this.group_names.iterator(); } public void addToGroup_names(String elem) { if (this.group_names == null) { this.group_names = new ArrayList(); } this.group_names.add(elem); } public List getGroup_names() { return this.group_names; } public void setGroup_names(List group_names) { this.group_names = group_names; } public void unsetGroup_names() { this.group_names = null; } /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ public boolean isSetGroup_names() { return this.group_names != null; } public void setGroup_namesIsSet(boolean value) { if (!value) { this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; case USER_NAME: if (value == null) { unsetUser_name(); } else { setUser_name((String)value); } break; case GROUP_NAMES: if (value == null) { unsetGroup_names(); } else { setGroup_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Short.valueOf(getMax_parts()); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_with_auth_args) return this.equals((get_partitions_with_auth_args)that); return false; } public boolean equals(get_partitions_with_auth_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); boolean present_user_name = true && (isSetUser_name()); builder.append(present_user_name); if (present_user_name) builder.append(user_name); boolean present_group_names = true && (isSetGroup_names()); builder.append(present_group_names); if (present_group_names) builder.append(group_names); return builder.toHashCode(); } public int compareTo(get_partitions_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_with_auth_args typedOther = (get_partitions_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_with_auth_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; if (!first) sb.append(", "); sb.append("user_name:"); if (this.user_name == null) { sb.append("null"); } else { sb.append(this.user_name); } first = false; if (!first) sb.append(", "); sb.append("group_names:"); if (this.group_names == null) { sb.append("null"); } else { sb.append(this.group_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_with_auth_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_with_auth_argsStandardScheme getScheme() { return new get_partitions_with_auth_argsStandardScheme(); } } private static class get_partitions_with_auth_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list712 = iprot.readListBegin(); struct.group_names = new ArrayList(_list712.size); for (int _i713 = 0; _i713 < _list712.size; ++_i713) { String _elem714; // optional _elem714 = iprot.readString(); struct.group_names.add(_elem714); } iprot.readListEnd(); } struct.setGroup_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); if (struct.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.user_name); oprot.writeFieldEnd(); } if (struct.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); for (String _iter715 : struct.group_names) { oprot.writeString(_iter715); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_with_auth_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_with_auth_argsTupleScheme getScheme() { return new get_partitions_with_auth_argsTupleScheme(); } } private static class get_partitions_with_auth_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_parts()) { optionals.set(2); } if (struct.isSetUser_name()) { optionals.set(3); } if (struct.isSetGroup_names()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter716 : struct.group_names) { oprot.writeString(_iter716); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } if (incoming.get(3)) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TList _list717 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList(_list717.size); for (int _i718 = 0; _i718 < _list717.size; ++_i718) { String _elem719; // optional _elem719 = iprot.readString(); struct.group_names.add(_elem719); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partitions_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_with_auth_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_with_auth_resultTupleSchemeFactory()); } private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); } public get_partitions_with_auth_result() { } public get_partitions_with_auth_result( List success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_with_auth_result(get_partitions_with_auth_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partitions_with_auth_result deepCopy() { return new get_partitions_with_auth_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_with_auth_result) return this.equals((get_partitions_with_auth_result)that); return false; } public boolean equals(get_partitions_with_auth_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_with_auth_result typedOther = (get_partitions_with_auth_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_with_auth_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_with_auth_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_with_auth_resultStandardScheme getScheme() { return new get_partitions_with_auth_resultStandardScheme(); } } private static class get_partitions_with_auth_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list720 = iprot.readListBegin(); struct.success = new ArrayList(_list720.size); for (int _i721 = 0; _i721 < _list720.size; ++_i721) { Partition _elem722; // optional _elem722 = new Partition(); _elem722.read(iprot); struct.success.add(_elem722); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter723 : struct.success) { _iter723.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_with_auth_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_with_auth_resultTupleScheme getScheme() { return new get_partitions_with_auth_resultTupleScheme(); } } private static class get_partitions_with_auth_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter724 : struct.success) { _iter724.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list725 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list725.size); for (int _i726 = 0; _i726 < _list725.size; ++_i726) { Partition _elem727; // optional _elem727 = new Partition(); _elem727.read(iprot); struct.success.add(_elem727); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_pspec_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_pspec_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private int max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", 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(get_partitions_pspec_args.class, metaDataMap); } public get_partitions_pspec_args() { this.max_parts = -1; } public get_partitions_pspec_args( String db_name, String tbl_name, int max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_pspec_args(get_partitions_pspec_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_parts = other.max_parts; } public get_partitions_pspec_args deepCopy() { return new get_partitions_pspec_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_parts = -1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getMax_parts() { return this.max_parts; } public void setMax_parts(int max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Integer.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_pspec_args) return this.equals((get_partitions_pspec_args)that); return false; } public boolean equals(get_partitions_pspec_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partitions_pspec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_pspec_args typedOther = (get_partitions_pspec_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_pspec_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_pspec_argsStandardScheme getScheme() { return new get_partitions_pspec_argsStandardScheme(); } } private static class get_partitions_pspec_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.max_parts = iprot.readI32(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_pspec_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI32(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_pspec_argsTupleScheme getScheme() { return new get_partitions_pspec_argsTupleScheme(); } } private static class get_partitions_pspec_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_parts()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_parts()) { oprot.writeI32(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_parts = iprot.readI32(); struct.setMax_partsIsSet(true); } } } } public static class get_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_pspec_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_pspec_resultTupleSchemeFactory()); } private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, PartitionSpec.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_pspec_result.class, metaDataMap); } public get_partitions_pspec_result() { } public get_partitions_pspec_result( List success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_pspec_result(get_partitions_pspec_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (PartitionSpec other_element : other.success) { __this__success.add(new PartitionSpec(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partitions_pspec_result deepCopy() { return new get_partitions_pspec_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(PartitionSpec elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_pspec_result) return this.equals((get_partitions_pspec_result)that); return false; } public boolean equals(get_partitions_pspec_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_pspec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_pspec_result typedOther = (get_partitions_pspec_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_pspec_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_pspec_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_pspec_resultStandardScheme getScheme() { return new get_partitions_pspec_resultStandardScheme(); } } private static class get_partitions_pspec_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list728 = iprot.readListBegin(); struct.success = new ArrayList(_list728.size); for (int _i729 = 0; _i729 < _list728.size; ++_i729) { PartitionSpec _elem730; // optional _elem730 = new PartitionSpec(); _elem730.read(iprot); struct.success.add(_elem730); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_pspec_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (PartitionSpec _iter731 : struct.success) { _iter731.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_pspec_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_pspec_resultTupleScheme getScheme() { return new get_partitions_pspec_resultTupleScheme(); } } private static class get_partitions_pspec_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (PartitionSpec _iter732 : struct.success) { _iter732.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list733 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list733.size); for (int _i734 = 0; _i734 < _list733.size; ++_i734) { PartitionSpec _elem735; // optional _elem735 = new PartitionSpec(); _elem735.read(iprot); struct.success.add(_elem735); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partition_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private short max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); } public get_partition_names_args() { this.max_parts = (short)-1; } public get_partition_names_args( String db_name, String tbl_name, short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partition_names_args(get_partition_names_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_parts = other.max_parts; } public get_partition_names_args deepCopy() { return new get_partition_names_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_args) return this.equals((get_partition_names_args)that); return false; } public boolean equals(get_partition_names_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partition_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_args typedOther = (get_partition_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_names_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_names_argsStandardSchemeFactory implements SchemeFactory { public get_partition_names_argsStandardScheme getScheme() { return new get_partition_names_argsStandardScheme(); } } private static class get_partition_names_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_names_argsTupleSchemeFactory implements SchemeFactory { public get_partition_names_argsTupleScheme getScheme() { return new get_partition_names_argsTupleScheme(); } } private static class get_partition_names_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_parts()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } } } } public static class get_partition_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_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 O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_resultTupleSchemeFactory()); } private List success; // required private MetaException o2; // 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"), O2((short)1, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } public get_partition_names_result() { } public get_partition_names_result( List success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partition_names_result(get_partition_names_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partition_names_result deepCopy() { return new get_partition_names_result(this); } @Override public void clear() { this.success = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_result) return this.equals((get_partition_names_result)that); return false; } public boolean equals(get_partition_names_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_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partition_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_result typedOther = (get_partition_names_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(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_names_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("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_names_resultStandardSchemeFactory implements SchemeFactory { public get_partition_names_resultStandardScheme getScheme() { return new get_partition_names_resultStandardScheme(); } } private static class get_partition_names_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list736 = iprot.readListBegin(); struct.success = new ArrayList(_list736.size); for (int _i737 = 0; _i737 < _list736.size; ++_i737) { String _elem738; // optional _elem738 = iprot.readString(); struct.success.add(_elem738); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter739 : struct.success) { oprot.writeString(_iter739); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_names_resultTupleSchemeFactory implements SchemeFactory { public get_partition_names_resultTupleScheme getScheme() { return new get_partition_names_resultTupleScheme(); } } private static class get_partition_names_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter740 : struct.success) { oprot.writeString(_iter740); } } } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list741 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list741.size); for (int _i742 = 0; _i742 < _list741.size; ++_i742) { String _elem743; // optional _elem743 = iprot.readString(); struct.success.add(_elem743); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_ps_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_ps_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private short max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); } public get_partitions_ps_args() { this.max_parts = (short)-1; } public get_partitions_ps_args( String db_name, String tbl_name, List part_vals, short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_ps_args(get_partitions_ps_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; } public get_partitions_ps_args deepCopy() { return new get_partitions_ps_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_args) return this.equals((get_partitions_ps_args)that); return false; } public boolean equals(get_partitions_ps_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partitions_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_args typedOther = (get_partitions_ps_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_ps_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_ps_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_ps_argsStandardScheme getScheme() { return new get_partitions_ps_argsStandardScheme(); } } private static class get_partitions_ps_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list744 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list744.size); for (int _i745 = 0; _i745 < _list744.size; ++_i745) { String _elem746; // optional _elem746 = iprot.readString(); struct.part_vals.add(_elem746); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter747 : struct.part_vals) { oprot.writeString(_iter747); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_ps_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_ps_argsTupleScheme getScheme() { return new get_partitions_ps_argsTupleScheme(); } } private static class get_partitions_ps_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetMax_parts()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter748 : struct.part_vals) { oprot.writeString(_iter748); } } } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list749 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list749.size); for (int _i750 = 0; _i750 < _list749.size; ++_i750) { String _elem751; // optional _elem751 = iprot.readString(); struct.part_vals.add(_elem751); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } } } } public static class get_partitions_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_ps_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_ps_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } public get_partitions_ps_result() { } public get_partitions_ps_result( List success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_ps_result(get_partitions_ps_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partitions_ps_result deepCopy() { return new get_partitions_ps_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_result) return this.equals((get_partitions_ps_result)that); return false; } public boolean equals(get_partitions_ps_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_result typedOther = (get_partitions_ps_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_ps_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_ps_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_ps_resultStandardScheme getScheme() { return new get_partitions_ps_resultStandardScheme(); } } private static class get_partitions_ps_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list752 = iprot.readListBegin(); struct.success = new ArrayList(_list752.size); for (int _i753 = 0; _i753 < _list752.size; ++_i753) { Partition _elem754; // optional _elem754 = new Partition(); _elem754.read(iprot); struct.success.add(_elem754); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter755 : struct.success) { _iter755.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_ps_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_ps_resultTupleScheme getScheme() { return new get_partitions_ps_resultTupleScheme(); } } private static class get_partitions_ps_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter756 : struct.success) { _iter756.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list757 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list757.size); for (int _i758 = 0; _i758 < _list757.size; ++_i758) { Partition _elem759; // optional _elem759 = new Partition(); _elem759.read(iprot); struct.success.add(_elem759); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_ps_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)6); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private short max_parts; // required private String user_name; // required private List group_names; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), MAX_PARTS((short)4, "max_parts"), USER_NAME((short)5, "user_name"), GROUP_NAMES((short)6, "group_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // MAX_PARTS return MAX_PARTS; case 5: // USER_NAME return USER_NAME; case 6: // GROUP_NAMES return GROUP_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_args.class, metaDataMap); } public get_partitions_ps_with_auth_args() { this.max_parts = (short)-1; } public get_partitions_ps_with_auth_args( String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; setMax_partsIsSet(true); this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on other. */ public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List __this__group_names = new ArrayList(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partitions_ps_with_auth_args deepCopy() { return new get_partitions_ps_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator getGroup_namesIterator() { return (this.group_names == null) ? null : this.group_names.iterator(); } public void addToGroup_names(String elem) { if (this.group_names == null) { this.group_names = new ArrayList(); } this.group_names.add(elem); } public List getGroup_names() { return this.group_names; } public void setGroup_names(List group_names) { this.group_names = group_names; } public void unsetGroup_names() { this.group_names = null; } /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ public boolean isSetGroup_names() { return this.group_names != null; } public void setGroup_namesIsSet(boolean value) { if (!value) { this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; case USER_NAME: if (value == null) { unsetUser_name(); } else { setUser_name((String)value); } break; case GROUP_NAMES: if (value == null) { unsetGroup_names(); } else { setGroup_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case MAX_PARTS: return Short.valueOf(getMax_parts()); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_with_auth_args) return this.equals((get_partitions_ps_with_auth_args)that); return false; } public boolean equals(get_partitions_ps_with_auth_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); boolean present_user_name = true && (isSetUser_name()); builder.append(present_user_name); if (present_user_name) builder.append(user_name); boolean present_group_names = true && (isSetGroup_names()); builder.append(present_group_names); if (present_group_names) builder.append(group_names); return builder.toHashCode(); } public int compareTo(get_partitions_ps_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_with_auth_args typedOther = (get_partitions_ps_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; if (!first) sb.append(", "); sb.append("user_name:"); if (this.user_name == null) { sb.append("null"); } else { sb.append(this.user_name); } first = false; if (!first) sb.append(", "); sb.append("group_names:"); if (this.group_names == null) { sb.append("null"); } else { sb.append(this.group_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_ps_with_auth_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_ps_with_auth_argsStandardScheme getScheme() { return new get_partitions_ps_with_auth_argsStandardScheme(); } } private static class get_partitions_ps_with_auth_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list760 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list760.size); for (int _i761 = 0; _i761 < _list760.size; ++_i761) { String _elem762; // optional _elem762 = iprot.readString(); struct.part_vals.add(_elem762); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list763 = iprot.readListBegin(); struct.group_names = new ArrayList(_list763.size); for (int _i764 = 0; _i764 < _list763.size; ++_i764) { String _elem765; // optional _elem765 = iprot.readString(); struct.group_names.add(_elem765); } iprot.readListEnd(); } struct.setGroup_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter766 : struct.part_vals) { oprot.writeString(_iter766); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); if (struct.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.user_name); oprot.writeFieldEnd(); } if (struct.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); for (String _iter767 : struct.group_names) { oprot.writeString(_iter767); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_ps_with_auth_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_ps_with_auth_argsTupleScheme getScheme() { return new get_partitions_ps_with_auth_argsTupleScheme(); } } private static class get_partitions_ps_with_auth_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetMax_parts()) { optionals.set(3); } if (struct.isSetUser_name()) { optionals.set(4); } if (struct.isSetGroup_names()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter768 : struct.part_vals) { oprot.writeString(_iter768); } } } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter769 : struct.group_names) { oprot.writeString(_iter769); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list770 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list770.size); for (int _i771 = 0; _i771 < _list770.size; ++_i771) { String _elem772; // optional _elem772 = iprot.readString(); struct.part_vals.add(_elem772); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } if (incoming.get(4)) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } if (incoming.get(5)) { { org.apache.thrift.protocol.TList _list773 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList(_list773.size); for (int _i774 = 0; _i774 < _list773.size; ++_i774) { String _elem775; // optional _elem775 = iprot.readString(); struct.group_names.add(_elem775); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_ps_with_auth_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_ps_with_auth_resultTupleSchemeFactory()); } private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); } public get_partitions_ps_with_auth_result() { } public get_partitions_ps_with_auth_result( List success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partitions_ps_with_auth_result deepCopy() { return new get_partitions_ps_with_auth_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_with_auth_result) return this.equals((get_partitions_ps_with_auth_result)that); return false; } public boolean equals(get_partitions_ps_with_auth_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_ps_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_with_auth_result typedOther = (get_partitions_ps_with_auth_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_ps_with_auth_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_ps_with_auth_resultStandardScheme getScheme() { return new get_partitions_ps_with_auth_resultStandardScheme(); } } private static class get_partitions_ps_with_auth_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list776 = iprot.readListBegin(); struct.success = new ArrayList(_list776.size); for (int _i777 = 0; _i777 < _list776.size; ++_i777) { Partition _elem778; // optional _elem778 = new Partition(); _elem778.read(iprot); struct.success.add(_elem778); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter779 : struct.success) { _iter779.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_ps_with_auth_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_ps_with_auth_resultTupleScheme getScheme() { return new get_partitions_ps_with_auth_resultTupleScheme(); } } private static class get_partitions_ps_with_auth_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter780 : struct.success) { _iter780.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_ps_with_auth_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list781 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list781.size); for (int _i782 = 0; _i782 < _list781.size; ++_i782) { Partition _elem783; // optional _elem783 = new Partition(); _elem783.read(iprot); struct.success.add(_elem783); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partition_names_ps_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_ps_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_ps_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private short max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } public get_partition_names_ps_args() { this.max_parts = (short)-1; } public get_partition_names_ps_args( String db_name, String tbl_name, List part_vals, short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partition_names_ps_args(get_partition_names_ps_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; } public get_partition_names_ps_args deepCopy() { return new get_partition_names_ps_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_ps_args) return this.equals((get_partition_names_ps_args)that); return false; } public boolean equals(get_partition_names_ps_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partition_names_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_names_ps_argsStandardSchemeFactory implements SchemeFactory { public get_partition_names_ps_argsStandardScheme getScheme() { return new get_partition_names_ps_argsStandardScheme(); } } private static class get_partition_names_ps_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list784 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list784.size); for (int _i785 = 0; _i785 < _list784.size; ++_i785) { String _elem786; // optional _elem786 = iprot.readString(); struct.part_vals.add(_elem786); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter787 : struct.part_vals) { oprot.writeString(_iter787); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_names_ps_argsTupleSchemeFactory implements SchemeFactory { public get_partition_names_ps_argsTupleScheme getScheme() { return new get_partition_names_ps_argsTupleScheme(); } } private static class get_partition_names_ps_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetMax_parts()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter788 : struct.part_vals) { oprot.writeString(_iter788); } } } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list789 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list789.size); for (int _i790 = 0; _i790 < _list789.size; ++_i790) { String _elem791; // optional _elem791 = iprot.readString(); struct.part_vals.add(_elem791); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } } } } public static class get_partition_names_ps_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_ps_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_ps_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } public get_partition_names_ps_result() { } public get_partition_names_ps_result( List success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partition_names_ps_result(get_partition_names_ps_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partition_names_ps_result deepCopy() { return new get_partition_names_ps_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_ps_result) return this.equals((get_partition_names_ps_result)that); return false; } public boolean equals(get_partition_names_ps_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partition_names_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_ps_result typedOther = (get_partition_names_ps_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_names_ps_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_names_ps_resultStandardSchemeFactory implements SchemeFactory { public get_partition_names_ps_resultStandardScheme getScheme() { return new get_partition_names_ps_resultStandardScheme(); } } private static class get_partition_names_ps_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list792 = iprot.readListBegin(); struct.success = new ArrayList(_list792.size); for (int _i793 = 0; _i793 < _list792.size; ++_i793) { String _elem794; // optional _elem794 = iprot.readString(); struct.success.add(_elem794); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter795 : struct.success) { oprot.writeString(_iter795); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_names_ps_resultTupleSchemeFactory implements SchemeFactory { public get_partition_names_ps_resultTupleScheme getScheme() { return new get_partition_names_ps_resultTupleScheme(); } } private static class get_partition_names_ps_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter796 : struct.success) { oprot.writeString(_iter796); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_names_ps_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list797 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list797.size); for (int _i798 = 0; _i798 < _list797.size; ++_i798) { String _elem799; // optional _elem799 = iprot.readString(); struct.success.add(_elem799); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_filter_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_filter_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String filter; // required private short max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), FILTER((short)3, "filter"), MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // FILTER return FILTER; case 4: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } public get_partitions_by_filter_args() { this.max_parts = (short)-1; } public get_partitions_by_filter_args( String db_name, String tbl_name, String filter, short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.filter = filter; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_by_filter_args(get_partitions_by_filter_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetFilter()) { this.filter = other.filter; } this.max_parts = other.max_parts; } public get_partitions_by_filter_args deepCopy() { return new get_partitions_by_filter_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.filter = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getFilter() { return this.filter; } public void setFilter(String filter) { this.filter = filter; } public void unsetFilter() { this.filter = null; } /** Returns true if field filter is set (has been assigned a value) and false otherwise */ public boolean isSetFilter() { return this.filter != null; } public void setFilterIsSet(boolean value) { if (!value) { this.filter = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case FILTER: if (value == null) { unsetFilter(); } else { setFilter((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case FILTER: return getFilter(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case FILTER: return isSetFilter(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_filter_args) return this.equals((get_partitions_by_filter_args)that); return false; } public boolean equals(get_partitions_by_filter_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_filter = true && this.isSetFilter(); boolean that_present_filter = true && that.isSetFilter(); if (this_present_filter || that_present_filter) { if (!(this_present_filter && that_present_filter)) return false; if (!this.filter.equals(that.filter)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_filter = true && (isSetFilter()); builder.append(present_filter); if (present_filter) builder.append(filter); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_partitions_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("filter:"); if (this.filter == null) { sb.append("null"); } else { sb.append(this.filter); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_by_filter_argsStandardScheme getScheme() { return new get_partitions_by_filter_argsStandardScheme(); } } private static class get_partitions_by_filter_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FILTER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.filter != null) { oprot.writeFieldBegin(FILTER_FIELD_DESC); oprot.writeString(struct.filter); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_by_filter_argsTupleScheme getScheme() { return new get_partitions_by_filter_argsTupleScheme(); } } private static class get_partitions_by_filter_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetFilter()) { optionals.set(2); } if (struct.isSetMax_parts()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetFilter()) { oprot.writeString(struct.filter); } if (struct.isSetMax_parts()) { oprot.writeI16(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } if (incoming.get(3)) { struct.max_parts = iprot.readI16(); struct.setMax_partsIsSet(true); } } } } public static class get_partitions_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_filter_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_filter_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } public get_partitions_by_filter_result() { } public get_partitions_by_filter_result( List success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_by_filter_result(get_partitions_by_filter_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partitions_by_filter_result deepCopy() { return new get_partitions_by_filter_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_filter_result) return this.equals((get_partitions_by_filter_result)that); return false; } public boolean equals(get_partitions_by_filter_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_filter_result typedOther = (get_partitions_by_filter_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_filter_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_by_filter_resultStandardScheme getScheme() { return new get_partitions_by_filter_resultStandardScheme(); } } private static class get_partitions_by_filter_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list800 = iprot.readListBegin(); struct.success = new ArrayList(_list800.size); for (int _i801 = 0; _i801 < _list800.size; ++_i801) { Partition _elem802; // optional _elem802 = new Partition(); _elem802.read(iprot); struct.success.add(_elem802); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter803 : struct.success) { _iter803.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_by_filter_resultTupleScheme getScheme() { return new get_partitions_by_filter_resultTupleScheme(); } } private static class get_partitions_by_filter_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter804 : struct.success) { _iter804.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list805 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list805.size); for (int _i806 = 0; _i806 < _list805.size; ++_i806) { Partition _elem807; // optional _elem807 = new Partition(); _elem807.read(iprot); struct.success.add(_elem807); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_part_specs_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_part_specs_by_filter_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_part_specs_by_filter_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String filter; // required private int max_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), FILTER((short)3, "filter"), MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // FILTER return FILTER; case 4: // MAX_PARTS return MAX_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_PARTS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", 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(get_part_specs_by_filter_args.class, metaDataMap); } public get_part_specs_by_filter_args() { this.max_parts = -1; } public get_part_specs_by_filter_args( String db_name, String tbl_name, String filter, int max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.filter = filter; this.max_parts = max_parts; setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_part_specs_by_filter_args(get_part_specs_by_filter_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetFilter()) { this.filter = other.filter; } this.max_parts = other.max_parts; } public get_part_specs_by_filter_args deepCopy() { return new get_part_specs_by_filter_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.filter = null; this.max_parts = -1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getFilter() { return this.filter; } public void setFilter(String filter) { this.filter = filter; } public void unsetFilter() { this.filter = null; } /** Returns true if field filter is set (has been assigned a value) and false otherwise */ public boolean isSetFilter() { return this.filter != null; } public void setFilterIsSet(boolean value) { if (!value) { this.filter = null; } } public int getMax_parts() { return this.max_parts; } public void setMax_parts(int max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } /** Returns true if field max_parts is set (has been assigned a value) and false otherwise */ public boolean isSetMax_parts() { return EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case FILTER: if (value == null) { unsetFilter(); } else { setFilter((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case FILTER: return getFilter(); case MAX_PARTS: return Integer.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case FILTER: return isSetFilter(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_part_specs_by_filter_args) return this.equals((get_part_specs_by_filter_args)that); return false; } public boolean equals(get_part_specs_by_filter_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_filter = true && this.isSetFilter(); boolean that_present_filter = true && that.isSetFilter(); if (this_present_filter || that_present_filter) { if (!(this_present_filter && that_present_filter)) return false; if (!this.filter.equals(that.filter)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_filter = true && (isSetFilter()); builder.append(present_filter); if (present_filter) builder.append(filter); boolean present_max_parts = true; builder.append(present_max_parts); if (present_max_parts) builder.append(max_parts); return builder.toHashCode(); } public int compareTo(get_part_specs_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_part_specs_by_filter_args typedOther = (get_part_specs_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_part_specs_by_filter_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("filter:"); if (this.filter == null) { sb.append("null"); } else { sb.append(this.filter); } first = false; if (!first) sb.append(", "); sb.append("max_parts:"); sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_part_specs_by_filter_argsStandardSchemeFactory implements SchemeFactory { public get_part_specs_by_filter_argsStandardScheme getScheme() { return new get_part_specs_by_filter_argsStandardScheme(); } } private static class get_part_specs_by_filter_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_by_filter_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FILTER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MAX_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.max_parts = iprot.readI32(); struct.setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_part_specs_by_filter_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.filter != null) { oprot.writeFieldBegin(FILTER_FIELD_DESC); oprot.writeString(struct.filter); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI32(struct.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_part_specs_by_filter_argsTupleSchemeFactory implements SchemeFactory { public get_part_specs_by_filter_argsTupleScheme getScheme() { return new get_part_specs_by_filter_argsTupleScheme(); } } private static class get_part_specs_by_filter_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetFilter()) { optionals.set(2); } if (struct.isSetMax_parts()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetFilter()) { oprot.writeString(struct.filter); } if (struct.isSetMax_parts()) { oprot.writeI32(struct.max_parts); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_part_specs_by_filter_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.filter = iprot.readString(); struct.setFilterIsSet(true); } if (incoming.get(3)) { struct.max_parts = iprot.readI32(); struct.setMax_partsIsSet(true); } } } } public static class get_part_specs_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_part_specs_by_filter_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_part_specs_by_filter_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, PartitionSpec.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_part_specs_by_filter_result.class, metaDataMap); } public get_part_specs_by_filter_result() { } public get_part_specs_by_filter_result( List success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_part_specs_by_filter_result(get_part_specs_by_filter_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (PartitionSpec other_element : other.success) { __this__success.add(new PartitionSpec(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_part_specs_by_filter_result deepCopy() { return new get_part_specs_by_filter_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(PartitionSpec elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_part_specs_by_filter_result) return this.equals((get_part_specs_by_filter_result)that); return false; } public boolean equals(get_part_specs_by_filter_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_part_specs_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_part_specs_by_filter_result typedOther = (get_part_specs_by_filter_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_part_specs_by_filter_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_part_specs_by_filter_resultStandardSchemeFactory implements SchemeFactory { public get_part_specs_by_filter_resultStandardScheme getScheme() { return new get_part_specs_by_filter_resultStandardScheme(); } } private static class get_part_specs_by_filter_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_by_filter_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list808 = iprot.readListBegin(); struct.success = new ArrayList(_list808.size); for (int _i809 = 0; _i809 < _list808.size; ++_i809) { PartitionSpec _elem810; // optional _elem810 = new PartitionSpec(); _elem810.read(iprot); struct.success.add(_elem810); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_part_specs_by_filter_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (PartitionSpec _iter811 : struct.success) { _iter811.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_part_specs_by_filter_resultTupleSchemeFactory implements SchemeFactory { public get_part_specs_by_filter_resultTupleScheme getScheme() { return new get_part_specs_by_filter_resultTupleScheme(); } } private static class get_part_specs_by_filter_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (PartitionSpec _iter812 : struct.success) { _iter812.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_part_specs_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list813 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list813.size); for (int _i814 = 0; _i814 < _list813.size; ++_i814) { PartitionSpec _elem815; // optional _elem815 = new PartitionSpec(); _elem815.read(iprot); struct.success.add(_elem815); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_by_expr_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_expr_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_expr_argsTupleSchemeFactory()); } private PartitionsByExprRequest req; // 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 { REQ((short)1, "req"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQ return REQ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsByExprRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_args.class, metaDataMap); } public get_partitions_by_expr_args() { } public get_partitions_by_expr_args( PartitionsByExprRequest req) { this(); this.req = req; } /** * Performs a deep copy on other. */ public get_partitions_by_expr_args(get_partitions_by_expr_args other) { if (other.isSetReq()) { this.req = new PartitionsByExprRequest(other.req); } } public get_partitions_by_expr_args deepCopy() { return new get_partitions_by_expr_args(this); } @Override public void clear() { this.req = null; } public PartitionsByExprRequest getReq() { return this.req; } public void setReq(PartitionsByExprRequest req) { this.req = req; } public void unsetReq() { this.req = null; } /** Returns true if field req is set (has been assigned a value) and false otherwise */ public boolean isSetReq() { return this.req != null; } public void setReqIsSet(boolean value) { if (!value) { this.req = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQ: if (value == null) { unsetReq(); } else { setReq((PartitionsByExprRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQ: return getReq(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQ: return isSetReq(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_expr_args) return this.equals((get_partitions_by_expr_args)that); return false; } public boolean equals(get_partitions_by_expr_args that) { if (that == null) return false; boolean this_present_req = true && this.isSetReq(); boolean that_present_req = true && that.isSetReq(); if (this_present_req || that_present_req) { if (!(this_present_req && that_present_req)) return false; if (!this.req.equals(that.req)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_req = true && (isSetReq()); builder.append(present_req); if (present_req) builder.append(req); return builder.toHashCode(); } public int compareTo(get_partitions_by_expr_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_expr_args typedOther = (get_partitions_by_expr_args)other; lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_expr_args("); boolean first = true; sb.append("req:"); if (this.req == null) { sb.append("null"); } else { sb.append(this.req); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (req != null) { req.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_expr_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_by_expr_argsStandardScheme getScheme() { return new get_partitions_by_expr_argsStandardScheme(); } } private static class get_partitions_by_expr_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.req = new PartitionsByExprRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.req != null) { oprot.writeFieldBegin(REQ_FIELD_DESC); struct.req.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_expr_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_by_expr_argsTupleScheme getScheme() { return new get_partitions_by_expr_argsTupleScheme(); } } private static class get_partitions_by_expr_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetReq()) { struct.req.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new PartitionsByExprRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class get_partitions_by_expr_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_expr_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_expr_resultTupleSchemeFactory()); } private PartitionsByExprResult success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, PartitionsByExprResult.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_result.class, metaDataMap); } public get_partitions_by_expr_result() { } public get_partitions_by_expr_result( PartitionsByExprResult success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_by_expr_result(get_partitions_by_expr_result other) { if (other.isSetSuccess()) { this.success = new PartitionsByExprResult(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partitions_by_expr_result deepCopy() { return new get_partitions_by_expr_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public PartitionsByExprResult getSuccess() { return this.success; } public void setSuccess(PartitionsByExprResult 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((PartitionsByExprResult)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_expr_result) return this.equals((get_partitions_by_expr_result)that); return false; } public boolean equals(get_partitions_by_expr_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_by_expr_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_expr_result typedOther = (get_partitions_by_expr_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_expr_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_expr_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_by_expr_resultStandardScheme getScheme() { return new get_partitions_by_expr_resultStandardScheme(); } } private static class get_partitions_by_expr_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new PartitionsByExprResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_expr_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_expr_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_by_expr_resultTupleScheme getScheme() { return new get_partitions_by_expr_resultTupleScheme(); } } private static class get_partitions_by_expr_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new PartitionsByExprResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_by_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("names", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_names_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_names_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List names; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), NAMES((short)3, "names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NAMES return NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NAMES, new org.apache.thrift.meta_data.FieldMetaData("names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_args.class, metaDataMap); } public get_partitions_by_names_args() { } public get_partitions_by_names_args( String db_name, String tbl_name, List names) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.names = names; } /** * Performs a deep copy on other. */ public get_partitions_by_names_args(get_partitions_by_names_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNames()) { List __this__names = new ArrayList(); for (String other_element : other.names) { __this__names.add(other_element); } this.names = __this__names; } } public get_partitions_by_names_args deepCopy() { return new get_partitions_by_names_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getNamesSize() { return (this.names == null) ? 0 : this.names.size(); } public java.util.Iterator getNamesIterator() { return (this.names == null) ? null : this.names.iterator(); } public void addToNames(String elem) { if (this.names == null) { this.names = new ArrayList(); } this.names.add(elem); } public List getNames() { return this.names; } public void setNames(List names) { this.names = names; } public void unsetNames() { this.names = null; } /** Returns true if field names is set (has been assigned a value) and false otherwise */ public boolean isSetNames() { return this.names != null; } public void setNamesIsSet(boolean value) { if (!value) { this.names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NAMES: if (value == null) { unsetNames(); } else { setNames((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case NAMES: return getNames(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case NAMES: return isSetNames(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_names_args) return this.equals((get_partitions_by_names_args)that); return false; } public boolean equals(get_partitions_by_names_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_names = true && this.isSetNames(); boolean that_present_names = true && that.isSetNames(); if (this_present_names || that_present_names) { if (!(this_present_names && that_present_names)) return false; if (!this.names.equals(that.names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_names = true && (isSetNames()); builder.append(present_names); if (present_names) builder.append(names); return builder.toHashCode(); } public int compareTo(get_partitions_by_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_names_args typedOther = (get_partitions_by_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNames()).compareTo(typedOther.isSetNames()); if (lastComparison != 0) { return lastComparison; } if (isSetNames()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.names, typedOther.names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_names_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("names:"); if (this.names == null) { sb.append("null"); } else { sb.append(this.names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_names_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_by_names_argsStandardScheme getScheme() { return new get_partitions_by_names_argsStandardScheme(); } } private static class get_partitions_by_names_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list816 = iprot.readListBegin(); struct.names = new ArrayList(_list816.size); for (int _i817 = 0; _i817 < _list816.size; ++_i817) { String _elem818; // optional _elem818 = iprot.readString(); struct.names.add(_elem818); } iprot.readListEnd(); } struct.setNamesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.names != null) { oprot.writeFieldBegin(NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.names.size())); for (String _iter819 : struct.names) { oprot.writeString(_iter819); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_names_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_by_names_argsTupleScheme getScheme() { return new get_partitions_by_names_argsTupleScheme(); } } private static class get_partitions_by_names_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNames()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNames()) { { oprot.writeI32(struct.names.size()); for (String _iter820 : struct.names) { oprot.writeString(_iter820); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list821 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.names = new ArrayList(_list821.size); for (int _i822 = 0; _i822 < _list821.size; ++_i822) { String _elem823; // optional _elem823 = iprot.readString(); struct.names.add(_elem823); } } struct.setNamesIsSet(true); } } } } public static class get_partitions_by_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_names_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Partition.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_result.class, metaDataMap); } public get_partitions_by_names_result() { } public get_partitions_by_names_result( List success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_by_names_result(get_partitions_by_names_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Partition other_element : other.success) { __this__success.add(new Partition(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partitions_by_names_result deepCopy() { return new get_partitions_by_names_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_names_result) return this.equals((get_partitions_by_names_result)that); return false; } public boolean equals(get_partitions_by_names_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_by_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_names_result typedOther = (get_partitions_by_names_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_by_names_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_by_names_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_by_names_resultStandardScheme getScheme() { return new get_partitions_by_names_resultStandardScheme(); } } private static class get_partitions_by_names_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list824 = iprot.readListBegin(); struct.success = new ArrayList(_list824.size); for (int _i825 = 0; _i825 < _list824.size; ++_i825) { Partition _elem826; // optional _elem826 = new Partition(); _elem826.read(iprot); struct.success.add(_elem826); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Partition _iter827 : struct.success) { _iter827.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_by_names_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_by_names_resultTupleScheme getScheme() { return new get_partitions_by_names_resultTupleScheme(); } } private static class get_partitions_by_names_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter828 : struct.success) { _iter828.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_names_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list829 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list829.size); for (int _i830 = 0; _i830 < _list829.size; ++_i830) { Partition _elem831; // optional _elem831 = new Partition(); _elem831.read(iprot); struct.success.add(_elem831); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class alter_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partition_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private Partition new_part; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), NEW_PART((short)3, "new_part"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_PART return NEW_PART; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } public alter_partition_args() { } public alter_partition_args( String db_name, String tbl_name, Partition new_part) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.new_part = new_part; } /** * Performs a deep copy on other. */ public alter_partition_args(alter_partition_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } } public alter_partition_args deepCopy() { return new alter_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.new_part = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public Partition getNew_part() { return this.new_part; } public void setNew_part(Partition new_part) { this.new_part = new_part; } public void unsetNew_part() { this.new_part = null; } /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } public void setNew_partIsSet(boolean value) { if (!value) { this.new_part = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_PART: if (value == null) { unsetNew_part(); } else { setNew_part((Partition)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case NEW_PART: return getNew_part(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case NEW_PART: return isSetNew_part(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partition_args) return this.equals((alter_partition_args)that); return false; } public boolean equals(alter_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_part = true && this.isSetNew_part(); boolean that_present_new_part = true && that.isSetNew_part(); if (this_present_new_part || that_present_new_part) { if (!(this_present_new_part && that_present_new_part)) return false; if (!this.new_part.equals(that.new_part)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_part = true && (isSetNew_part()); builder.append(present_new_part); if (present_new_part) builder.append(new_part); return builder.toHashCode(); } public int compareTo(alter_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_args typedOther = (alter_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partition_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_part:"); if (this.new_part == null) { sb.append("null"); } else { sb.append(this.new_part); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_part != null) { new_part.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partition_argsStandardSchemeFactory implements SchemeFactory { public alter_partition_argsStandardScheme getScheme() { return new alter_partition_argsStandardScheme(); } } private static class alter_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_PART if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); struct.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partition_argsTupleSchemeFactory implements SchemeFactory { public alter_partition_argsTupleScheme getScheme() { return new alter_partition_argsTupleScheme(); } } private static class alter_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_part()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_part()) { struct.new_part.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } } } } public static class alter_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partition_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_partition_result.class, metaDataMap); } public alter_partition_result() { } public alter_partition_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_partition_result(alter_partition_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_partition_result deepCopy() { return new alter_partition_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partition_result) return this.equals((alter_partition_result)that); return false; } public boolean equals(alter_partition_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_result typedOther = (alter_partition_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partition_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partition_resultStandardSchemeFactory implements SchemeFactory { public alter_partition_resultStandardScheme getScheme() { return new alter_partition_resultStandardScheme(); } } private static class alter_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partition_resultTupleSchemeFactory implements SchemeFactory { public alter_partition_resultTupleScheme getScheme() { return new alter_partition_resultTupleScheme(); } } private static class alter_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class alter_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partitions_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List new_parts; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), NEW_PARTS((short)3, "new_parts"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_PARTS return NEW_PARTS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", 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, Partition.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_args.class, metaDataMap); } public alter_partitions_args() { } public alter_partitions_args( String db_name, String tbl_name, List new_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.new_parts = new_parts; } /** * Performs a deep copy on other. */ public alter_partitions_args(alter_partitions_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_parts()) { List __this__new_parts = new ArrayList(); for (Partition other_element : other.new_parts) { __this__new_parts.add(new Partition(other_element)); } this.new_parts = __this__new_parts; } } public alter_partitions_args deepCopy() { return new alter_partitions_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.new_parts = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getNew_partsSize() { return (this.new_parts == null) ? 0 : this.new_parts.size(); } public java.util.Iterator getNew_partsIterator() { return (this.new_parts == null) ? null : this.new_parts.iterator(); } public void addToNew_parts(Partition elem) { if (this.new_parts == null) { this.new_parts = new ArrayList(); } this.new_parts.add(elem); } public List getNew_parts() { return this.new_parts; } public void setNew_parts(List new_parts) { this.new_parts = new_parts; } public void unsetNew_parts() { this.new_parts = null; } /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ public boolean isSetNew_parts() { return this.new_parts != null; } public void setNew_partsIsSet(boolean value) { if (!value) { this.new_parts = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_PARTS: if (value == null) { unsetNew_parts(); } else { setNew_parts((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case NEW_PARTS: return getNew_parts(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case NEW_PARTS: return isSetNew_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partitions_args) return this.equals((alter_partitions_args)that); return false; } public boolean equals(alter_partitions_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_parts = true && this.isSetNew_parts(); boolean that_present_new_parts = true && that.isSetNew_parts(); if (this_present_new_parts || that_present_new_parts) { if (!(this_present_new_parts && that_present_new_parts)) return false; if (!this.new_parts.equals(that.new_parts)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_parts = true && (isSetNew_parts()); builder.append(present_new_parts); if (present_new_parts) builder.append(new_parts); return builder.toHashCode(); } public int compareTo(alter_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partitions_args typedOther = (alter_partitions_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(typedOther.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, typedOther.new_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partitions_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_parts:"); if (this.new_parts == null) { sb.append("null"); } else { sb.append(this.new_parts); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partitions_argsStandardSchemeFactory implements SchemeFactory { public alter_partitions_argsStandardScheme getScheme() { return new alter_partitions_argsStandardScheme(); } } private static class alter_partitions_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list832 = iprot.readListBegin(); struct.new_parts = new ArrayList(_list832.size); for (int _i833 = 0; _i833 < _list832.size; ++_i833) { Partition _elem834; // optional _elem834 = new Partition(); _elem834.read(iprot); struct.new_parts.add(_elem834); } iprot.readListEnd(); } struct.setNew_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_parts != null) { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.new_parts.size())); for (Partition _iter835 : struct.new_parts) { _iter835.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partitions_argsTupleSchemeFactory implements SchemeFactory { public alter_partitions_argsTupleScheme getScheme() { return new alter_partitions_argsTupleScheme(); } } private static class alter_partitions_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_parts()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_parts()) { { oprot.writeI32(struct.new_parts.size()); for (Partition _iter836 : struct.new_parts) { _iter836.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list837 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList(_list837.size); for (int _i838 = 0; _i838 < _list837.size; ++_i838) { Partition _elem839; // optional _elem839 = new Partition(); _elem839.read(iprot); struct.new_parts.add(_elem839); } } struct.setNew_partsIsSet(true); } } } } public static class alter_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partitions_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_partitions_result.class, metaDataMap); } public alter_partitions_result() { } public alter_partitions_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_partitions_result(alter_partitions_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_partitions_result deepCopy() { return new alter_partitions_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partitions_result) return this.equals((alter_partitions_result)that); return false; } public boolean equals(alter_partitions_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partitions_result typedOther = (alter_partitions_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partitions_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partitions_resultStandardSchemeFactory implements SchemeFactory { public alter_partitions_resultStandardScheme getScheme() { return new alter_partitions_resultStandardScheme(); } } private static class alter_partitions_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partitions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partitions_resultTupleSchemeFactory implements SchemeFactory { public alter_partitions_resultTupleScheme getScheme() { return new alter_partitions_resultTupleScheme(); } } private static class alter_partitions_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class alter_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partition_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partition_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private Partition new_part; // required private EnvironmentContext environment_context; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), NEW_PART((short)3, "new_part"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_PART return NEW_PART; case 4: // ENVIRONMENT_CONTEXT return ENVIRONMENT_CONTEXT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_with_environment_context_args.class, metaDataMap); } public alter_partition_with_environment_context_args() { } public alter_partition_with_environment_context_args( String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.new_part = new_part; this.environment_context = environment_context; } /** * Performs a deep copy on other. */ public alter_partition_with_environment_context_args(alter_partition_with_environment_context_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public alter_partition_with_environment_context_args deepCopy() { return new alter_partition_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.new_part = null; this.environment_context = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public Partition getNew_part() { return this.new_part; } public void setNew_part(Partition new_part) { this.new_part = new_part; } public void unsetNew_part() { this.new_part = null; } /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } public void setNew_partIsSet(boolean value) { if (!value) { this.new_part = null; } } public EnvironmentContext getEnvironment_context() { return this.environment_context; } public void setEnvironment_context(EnvironmentContext environment_context) { this.environment_context = environment_context; } public void unsetEnvironment_context() { this.environment_context = null; } /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ public boolean isSetEnvironment_context() { return this.environment_context != null; } public void setEnvironment_contextIsSet(boolean value) { if (!value) { this.environment_context = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case NEW_PART: if (value == null) { unsetNew_part(); } else { setNew_part((Partition)value); } break; case ENVIRONMENT_CONTEXT: if (value == null) { unsetEnvironment_context(); } else { setEnvironment_context((EnvironmentContext)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case NEW_PART: return getNew_part(); case ENVIRONMENT_CONTEXT: return getEnvironment_context(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case NEW_PART: return isSetNew_part(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partition_with_environment_context_args) return this.equals((alter_partition_with_environment_context_args)that); return false; } public boolean equals(alter_partition_with_environment_context_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_new_part = true && this.isSetNew_part(); boolean that_present_new_part = true && that.isSetNew_part(); if (this_present_new_part || that_present_new_part) { if (!(this_present_new_part && that_present_new_part)) return false; if (!this.new_part.equals(that.new_part)) return false; } boolean this_present_environment_context = true && this.isSetEnvironment_context(); boolean that_present_environment_context = true && that.isSetEnvironment_context(); if (this_present_environment_context || that_present_environment_context) { if (!(this_present_environment_context && that_present_environment_context)) return false; if (!this.environment_context.equals(that.environment_context)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_new_part = true && (isSetNew_part()); builder.append(present_new_part); if (present_new_part) builder.append(new_part); boolean present_environment_context = true && (isSetEnvironment_context()); builder.append(present_environment_context); if (present_environment_context) builder.append(environment_context); return builder.toHashCode(); } public int compareTo(alter_partition_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_with_environment_context_args typedOther = (alter_partition_with_environment_context_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(typedOther.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, typedOther.environment_context); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partition_with_environment_context_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("new_part:"); if (this.new_part == null) { sb.append("null"); } else { sb.append(this.new_part); } first = false; if (!first) sb.append(", "); sb.append("environment_context:"); if (this.environment_context == null) { sb.append("null"); } else { sb.append(this.environment_context); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_part != null) { new_part.validate(); } if (environment_context != null) { environment_context.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public alter_partition_with_environment_context_argsStandardScheme getScheme() { return new alter_partition_with_environment_context_argsStandardScheme(); } } private static class alter_partition_with_environment_context_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_PART if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ENVIRONMENT_CONTEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); struct.new_part.write(oprot); oprot.writeFieldEnd(); } if (struct.environment_context != null) { oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); struct.environment_context.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public alter_partition_with_environment_context_argsTupleScheme getScheme() { return new alter_partition_with_environment_context_argsTupleScheme(); } } private static class alter_partition_with_environment_context_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetNew_part()) { optionals.set(2); } if (struct.isSetEnvironment_context()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetNew_part()) { struct.new_part.write(oprot); } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class alter_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partition_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partition_with_environment_context_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_partition_with_environment_context_result.class, metaDataMap); } public alter_partition_with_environment_context_result() { } public alter_partition_with_environment_context_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_partition_with_environment_context_result(alter_partition_with_environment_context_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_partition_with_environment_context_result deepCopy() { return new alter_partition_with_environment_context_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partition_with_environment_context_result) return this.equals((alter_partition_with_environment_context_result)that); return false; } public boolean equals(alter_partition_with_environment_context_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_partition_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_with_environment_context_result typedOther = (alter_partition_with_environment_context_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_partition_with_environment_context_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public alter_partition_with_environment_context_resultStandardScheme getScheme() { return new alter_partition_with_environment_context_resultStandardScheme(); } } private static class alter_partition_with_environment_context_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public alter_partition_with_environment_context_resultTupleScheme getScheme() { return new alter_partition_with_environment_context_resultTupleScheme(); } } private static class alter_partition_with_environment_context_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partition_with_environment_context_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class rename_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new rename_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new rename_partition_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List part_vals; // required private Partition new_part; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), NEW_PART((short)4, "new_part"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // NEW_PART return NEW_PART; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_partition_args.class, metaDataMap); } public rename_partition_args() { } public rename_partition_args( String db_name, String tbl_name, List part_vals, Partition new_part) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.new_part = new_part; } /** * Performs a deep copy on other. */ public rename_partition_args(rename_partition_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } } public rename_partition_args deepCopy() { return new rename_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.new_part = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public Partition getNew_part() { return this.new_part; } public void setNew_part(Partition new_part) { this.new_part = new_part; } public void unsetNew_part() { this.new_part = null; } /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } public void setNew_partIsSet(boolean value) { if (!value) { this.new_part = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case NEW_PART: if (value == null) { unsetNew_part(); } else { setNew_part((Partition)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case NEW_PART: return getNew_part(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case NEW_PART: return isSetNew_part(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof rename_partition_args) return this.equals((rename_partition_args)that); return false; } public boolean equals(rename_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_new_part = true && this.isSetNew_part(); boolean that_present_new_part = true && that.isSetNew_part(); if (this_present_new_part || that_present_new_part) { if (!(this_present_new_part && that_present_new_part)) return false; if (!this.new_part.equals(that.new_part)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_new_part = true && (isSetNew_part()); builder.append(present_new_part); if (present_new_part) builder.append(new_part); return builder.toHashCode(); } public int compareTo(rename_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_partition_args typedOther = (rename_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("rename_partition_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("new_part:"); if (this.new_part == null) { sb.append("null"); } else { sb.append(this.new_part); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_part != null) { new_part.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class rename_partition_argsStandardSchemeFactory implements SchemeFactory { public rename_partition_argsStandardScheme getScheme() { return new rename_partition_argsStandardScheme(); } } private static class rename_partition_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list840 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list840.size); for (int _i841 = 0; _i841 < _list840.size; ++_i841) { String _elem842; // optional _elem842 = iprot.readString(); struct.part_vals.add(_elem842); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NEW_PART if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter843 : struct.part_vals) { oprot.writeString(_iter843); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); struct.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class rename_partition_argsTupleSchemeFactory implements SchemeFactory { public rename_partition_argsTupleScheme getScheme() { return new rename_partition_argsTupleScheme(); } } private static class rename_partition_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetNew_part()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter844 : struct.part_vals) { oprot.writeString(_iter844); } } } if (struct.isSetNew_part()) { struct.new_part.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list845 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list845.size); for (int _i846 = 0; _i846 < _list845.size; ++_i846) { String _elem847; // optional _elem847 = iprot.readString(); struct.part_vals.add(_elem847); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.new_part = new Partition(); struct.new_part.read(iprot); struct.setNew_partIsSet(true); } } } } public static class rename_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new rename_partition_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new rename_partition_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(rename_partition_result.class, metaDataMap); } public rename_partition_result() { } public rename_partition_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public rename_partition_result(rename_partition_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public rename_partition_result deepCopy() { return new rename_partition_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof rename_partition_result) return this.equals((rename_partition_result)that); return false; } public boolean equals(rename_partition_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(rename_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_partition_result typedOther = (rename_partition_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("rename_partition_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class rename_partition_resultStandardSchemeFactory implements SchemeFactory { public rename_partition_resultStandardScheme getScheme() { return new rename_partition_resultStandardScheme(); } } private static class rename_partition_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, rename_partition_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, rename_partition_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class rename_partition_resultTupleSchemeFactory implements SchemeFactory { public rename_partition_resultTupleScheme getScheme() { return new rename_partition_resultTupleScheme(); } } private static class rename_partition_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, rename_partition_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class partition_name_has_valid_characters_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_args"); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField THROW_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("throw_exception", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_has_valid_characters_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_has_valid_characters_argsTupleSchemeFactory()); } private List part_vals; // required private boolean throw_exception; // 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 { PART_VALS((short)1, "part_vals"), THROW_EXCEPTION((short)2, "throw_exception"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PART_VALS return PART_VALS; case 2: // THROW_EXCEPTION return THROW_EXCEPTION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __THROW_EXCEPTION_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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.THROW_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("throw_exception", 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(partition_name_has_valid_characters_args.class, metaDataMap); } public partition_name_has_valid_characters_args() { } public partition_name_has_valid_characters_args( List part_vals, boolean throw_exception) { this(); this.part_vals = part_vals; this.throw_exception = throw_exception; setThrow_exceptionIsSet(true); } /** * Performs a deep copy on other. */ public partition_name_has_valid_characters_args(partition_name_has_valid_characters_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPart_vals()) { List __this__part_vals = new ArrayList(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.throw_exception = other.throw_exception; } public partition_name_has_valid_characters_args deepCopy() { return new partition_name_has_valid_characters_args(this); } @Override public void clear() { this.part_vals = null; setThrow_exceptionIsSet(false); this.throw_exception = false; } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator getPart_valsIterator() { return (this.part_vals == null) ? null : this.part_vals.iterator(); } public void addToPart_vals(String elem) { if (this.part_vals == null) { this.part_vals = new ArrayList(); } this.part_vals.add(elem); } public List getPart_vals() { return this.part_vals; } public void setPart_vals(List part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } public boolean isThrow_exception() { return this.throw_exception; } public void setThrow_exception(boolean throw_exception) { this.throw_exception = throw_exception; setThrow_exceptionIsSet(true); } public void unsetThrow_exception() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); } /** Returns true if field throw_exception is set (has been assigned a value) and false otherwise */ public boolean isSetThrow_exception() { return EncodingUtils.testBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); } public void setThrow_exceptionIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((List)value); } break; case THROW_EXCEPTION: if (value == null) { unsetThrow_exception(); } else { setThrow_exception((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PART_VALS: return getPart_vals(); case THROW_EXCEPTION: return Boolean.valueOf(isThrow_exception()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PART_VALS: return isSetPart_vals(); case THROW_EXCEPTION: return isSetThrow_exception(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_has_valid_characters_args) return this.equals((partition_name_has_valid_characters_args)that); return false; } public boolean equals(partition_name_has_valid_characters_args that) { if (that == null) return false; boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_throw_exception = true; boolean that_present_throw_exception = true; if (this_present_throw_exception || that_present_throw_exception) { if (!(this_present_throw_exception && that_present_throw_exception)) return false; if (this.throw_exception != that.throw_exception) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_throw_exception = true; builder.append(present_throw_exception); if (present_throw_exception) builder.append(throw_exception); return builder.toHashCode(); } public int compareTo(partition_name_has_valid_characters_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_has_valid_characters_args typedOther = (partition_name_has_valid_characters_args)other; lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetThrow_exception()).compareTo(typedOther.isSetThrow_exception()); if (lastComparison != 0) { return lastComparison; } if (isSetThrow_exception()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.throw_exception, typedOther.throw_exception); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_has_valid_characters_args("); boolean first = true; sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("throw_exception:"); sb.append(this.throw_exception); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_has_valid_characters_argsStandardSchemeFactory implements SchemeFactory { public partition_name_has_valid_characters_argsStandardScheme getScheme() { return new partition_name_has_valid_characters_argsStandardScheme(); } } private static class partition_name_has_valid_characters_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list848 = iprot.readListBegin(); struct.part_vals = new ArrayList(_list848.size); for (int _i849 = 0; _i849 < _list848.size; ++_i849) { String _elem850; // optional _elem850 = iprot.readString(); struct.part_vals.add(_elem850); } iprot.readListEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // THROW_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.throw_exception = iprot.readBool(); struct.setThrow_exceptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (String _iter851 : struct.part_vals) { oprot.writeString(_iter851); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(THROW_EXCEPTION_FIELD_DESC); oprot.writeBool(struct.throw_exception); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_has_valid_characters_argsTupleSchemeFactory implements SchemeFactory { public partition_name_has_valid_characters_argsTupleScheme getScheme() { return new partition_name_has_valid_characters_argsTupleScheme(); } } private static class partition_name_has_valid_characters_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPart_vals()) { optionals.set(0); } if (struct.isSetThrow_exception()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (String _iter852 : struct.part_vals) { oprot.writeString(_iter852); } } } if (struct.isSetThrow_exception()) { oprot.writeBool(struct.throw_exception); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list853 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList(_list853.size); for (int _i854 = 0; _i854 < _list853.size; ++_i854) { String _elem855; // optional _elem855 = iprot.readString(); struct.part_vals.add(_elem855); } } struct.setPart_valsIsSet(true); } if (incoming.get(1)) { struct.throw_exception = iprot.readBool(); struct.setThrow_exceptionIsSet(true); } } } } public static class partition_name_has_valid_characters_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_has_valid_characters_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_has_valid_characters_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(partition_name_has_valid_characters_result.class, metaDataMap); } public partition_name_has_valid_characters_result() { } public partition_name_has_valid_characters_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public partition_name_has_valid_characters_result(partition_name_has_valid_characters_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public partition_name_has_valid_characters_result deepCopy() { return new partition_name_has_valid_characters_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_has_valid_characters_result) return this.equals((partition_name_has_valid_characters_result)that); return false; } public boolean equals(partition_name_has_valid_characters_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(partition_name_has_valid_characters_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_has_valid_characters_result typedOther = (partition_name_has_valid_characters_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_has_valid_characters_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_has_valid_characters_resultStandardSchemeFactory implements SchemeFactory { public partition_name_has_valid_characters_resultStandardScheme getScheme() { return new partition_name_has_valid_characters_resultStandardScheme(); } } private static class partition_name_has_valid_characters_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_has_valid_characters_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_has_valid_characters_resultTupleSchemeFactory implements SchemeFactory { public partition_name_has_valid_characters_resultTupleScheme getScheme() { return new partition_name_has_valid_characters_resultTupleScheme(); } } private static class partition_name_has_valid_characters_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_config_value_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_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 DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultValue", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_config_value_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_config_value_argsTupleSchemeFactory()); } private String name; // required private String defaultValue; // 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"), DEFAULT_VALUE((short)2, "defaultValue"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DEFAULT_VALUE return DEFAULT_VALUE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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))); tmpMap.put(_Fields.DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("defaultValue", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } public get_config_value_args() { } public get_config_value_args( String name, String defaultValue) { this(); this.name = name; this.defaultValue = defaultValue; } /** * Performs a deep copy on other. */ public get_config_value_args(get_config_value_args other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetDefaultValue()) { this.defaultValue = other.defaultValue; } } public get_config_value_args deepCopy() { return new get_config_value_args(this); } @Override public void clear() { this.name = null; this.defaultValue = 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 String getDefaultValue() { return this.defaultValue; } public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } public void unsetDefaultValue() { this.defaultValue = null; } /** Returns true if field defaultValue is set (has been assigned a value) and false otherwise */ public boolean isSetDefaultValue() { return this.defaultValue != null; } public void setDefaultValueIsSet(boolean value) { if (!value) { this.defaultValue = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DEFAULT_VALUE: if (value == null) { unsetDefaultValue(); } else { setDefaultValue((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case DEFAULT_VALUE: return getDefaultValue(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DEFAULT_VALUE: return isSetDefaultValue(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_config_value_args) return this.equals((get_config_value_args)that); return false; } public boolean equals(get_config_value_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_defaultValue = true && this.isSetDefaultValue(); boolean that_present_defaultValue = true && that.isSetDefaultValue(); if (this_present_defaultValue || that_present_defaultValue) { if (!(this_present_defaultValue && that_present_defaultValue)) return false; if (!this.defaultValue.equals(that.defaultValue)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_defaultValue = true && (isSetDefaultValue()); builder.append(present_defaultValue); if (present_defaultValue) builder.append(defaultValue); return builder.toHashCode(); } public int compareTo(get_config_value_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_config_value_args typedOther = (get_config_value_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(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); if (lastComparison != 0) { return lastComparison; } if (isSetDefaultValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_config_value_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("defaultValue:"); if (this.defaultValue == null) { sb.append("null"); } else { sb.append(this.defaultValue); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_config_value_argsStandardSchemeFactory implements SchemeFactory { public get_config_value_argsStandardScheme getScheme() { return new get_config_value_argsStandardScheme(); } } private static class get_config_value_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DEFAULT_VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.defaultValue = iprot.readString(); struct.setDefaultValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.defaultValue != null) { oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); oprot.writeString(struct.defaultValue); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_config_value_argsTupleSchemeFactory implements SchemeFactory { public get_config_value_argsTupleScheme getScheme() { return new get_config_value_argsTupleScheme(); } } private static class get_config_value_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetDefaultValue()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetDefaultValue()) { oprot.writeString(struct.defaultValue); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { struct.defaultValue = iprot.readString(); struct.setDefaultValueIsSet(true); } } } } public static class get_config_value_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_config_value_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_config_value_resultTupleSchemeFactory()); } private String success; // required private ConfigValSecurityException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); } public get_config_value_result() { } public get_config_value_result( String success, ConfigValSecurityException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_config_value_result(get_config_value_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetO1()) { this.o1 = new ConfigValSecurityException(other.o1); } } public get_config_value_result deepCopy() { return new get_config_value_result(this); } @Override public void clear() { this.success = null; this.o1 = 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 ConfigValSecurityException getO1() { return this.o1; } public void setO1(ConfigValSecurityException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((ConfigValSecurityException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_config_value_result) return this.equals((get_config_value_result)that); return false; } public boolean equals(get_config_value_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_config_value_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_config_value_result typedOther = (get_config_value_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_config_value_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_config_value_resultStandardSchemeFactory implements SchemeFactory { public get_config_value_resultStandardScheme getScheme() { return new get_config_value_resultStandardScheme(); } } private static class get_config_value_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_config_value_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new ConfigValSecurityException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_config_value_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_config_value_resultTupleSchemeFactory implements SchemeFactory { public get_config_value_resultTupleScheme getScheme() { return new get_config_value_resultTupleScheme(); } } private static class get_config_value_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_config_value_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new ConfigValSecurityException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class partition_name_to_vals_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_args"); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_vals_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_vals_argsTupleSchemeFactory()); } private String part_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 { PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PART_NAME return PART_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.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_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(partition_name_to_vals_args.class, metaDataMap); } public partition_name_to_vals_args() { } public partition_name_to_vals_args( String part_name) { this(); this.part_name = part_name; } /** * Performs a deep copy on other. */ public partition_name_to_vals_args(partition_name_to_vals_args other) { if (other.isSetPart_name()) { this.part_name = other.part_name; } } public partition_name_to_vals_args deepCopy() { return new partition_name_to_vals_args(this); } @Override public void clear() { this.part_name = null; } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PART_NAME: return getPart_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PART_NAME: return isSetPart_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_to_vals_args) return this.equals((partition_name_to_vals_args)that); return false; } public boolean equals(partition_name_to_vals_args that) { if (that == null) return false; boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); return builder.toHashCode(); } public int compareTo(partition_name_to_vals_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); boolean first = true; sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_to_vals_argsStandardSchemeFactory implements SchemeFactory { public partition_name_to_vals_argsStandardScheme getScheme() { return new partition_name_to_vals_argsStandardScheme(); } } private static class partition_name_to_vals_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_to_vals_argsTupleSchemeFactory implements SchemeFactory { public partition_name_to_vals_argsTupleScheme getScheme() { return new partition_name_to_vals_argsTupleScheme(); } } private static class partition_name_to_vals_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPart_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } } } } public static class partition_name_to_vals_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_vals_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_vals_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(partition_name_to_vals_result.class, metaDataMap); } public partition_name_to_vals_result() { } public partition_name_to_vals_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public partition_name_to_vals_result(partition_name_to_vals_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public partition_name_to_vals_result deepCopy() { return new partition_name_to_vals_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_to_vals_result) return this.equals((partition_name_to_vals_result)that); return false; } public boolean equals(partition_name_to_vals_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(partition_name_to_vals_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_vals_result typedOther = (partition_name_to_vals_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_to_vals_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_to_vals_resultStandardSchemeFactory implements SchemeFactory { public partition_name_to_vals_resultStandardScheme getScheme() { return new partition_name_to_vals_resultStandardScheme(); } } private static class partition_name_to_vals_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list856 = iprot.readListBegin(); struct.success = new ArrayList(_list856.size); for (int _i857 = 0; _i857 < _list856.size; ++_i857) { String _elem858; // optional _elem858 = iprot.readString(); struct.success.add(_elem858); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter859 : struct.success) { oprot.writeString(_iter859); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_to_vals_resultTupleSchemeFactory implements SchemeFactory { public partition_name_to_vals_resultTupleScheme getScheme() { return new partition_name_to_vals_resultTupleScheme(); } } private static class partition_name_to_vals_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter860 : struct.success) { oprot.writeString(_iter860); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_vals_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list861 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list861.size); for (int _i862 = 0; _i862 < _list861.size; ++_i862) { String _elem863; // optional _elem863 = iprot.readString(); struct.success.add(_elem863); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class partition_name_to_spec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_args"); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_spec_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_spec_argsTupleSchemeFactory()); } private String part_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 { PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PART_NAME return PART_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.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_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(partition_name_to_spec_args.class, metaDataMap); } public partition_name_to_spec_args() { } public partition_name_to_spec_args( String part_name) { this(); this.part_name = part_name; } /** * Performs a deep copy on other. */ public partition_name_to_spec_args(partition_name_to_spec_args other) { if (other.isSetPart_name()) { this.part_name = other.part_name; } } public partition_name_to_spec_args deepCopy() { return new partition_name_to_spec_args(this); } @Override public void clear() { this.part_name = null; } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PART_NAME: return getPart_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PART_NAME: return isSetPart_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_to_spec_args) return this.equals((partition_name_to_spec_args)that); return false; } public boolean equals(partition_name_to_spec_args that) { if (that == null) return false; boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); return builder.toHashCode(); } public int compareTo(partition_name_to_spec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_spec_args typedOther = (partition_name_to_spec_args)other; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); boolean first = true; sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_to_spec_argsStandardSchemeFactory implements SchemeFactory { public partition_name_to_spec_argsStandardScheme getScheme() { return new partition_name_to_spec_argsStandardScheme(); } } private static class partition_name_to_spec_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_to_spec_argsTupleSchemeFactory implements SchemeFactory { public partition_name_to_spec_argsTupleScheme getScheme() { return new partition_name_to_spec_argsTupleScheme(); } } private static class partition_name_to_spec_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPart_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } } } } public static class partition_name_to_spec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_spec_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_spec_resultTupleSchemeFactory()); } private Map success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(partition_name_to_spec_result.class, metaDataMap); } public partition_name_to_spec_result() { } public partition_name_to_spec_result( Map success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public partition_name_to_spec_result(partition_name_to_spec_result other) { if (other.isSetSuccess()) { Map __this__success = new HashMap(); for (Map.Entry 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; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public partition_name_to_spec_result deepCopy() { return new partition_name_to_spec_result(this); } @Override public void clear() { this.success = null; this.o1 = 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(); } this.success.put(key, val); } public Map getSuccess() { return this.success; } public void setSuccess(Map 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof partition_name_to_spec_result) return this.equals((partition_name_to_spec_result)that); return false; } public boolean equals(partition_name_to_spec_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(partition_name_to_spec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_spec_result typedOther = (partition_name_to_spec_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("partition_name_to_spec_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class partition_name_to_spec_resultStandardSchemeFactory implements SchemeFactory { public partition_name_to_spec_resultStandardScheme getScheme() { return new partition_name_to_spec_resultStandardScheme(); } } private static class partition_name_to_spec_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map864 = iprot.readMapBegin(); struct.success = new HashMap(2*_map864.size); for (int _i865 = 0; _i865 < _map864.size; ++_i865) { String _key866; // required String _val867; // required _key866 = iprot.readString(); _val867 = iprot.readString(); struct.success.put(_key866, _val867); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (Map.Entry _iter868 : struct.success.entrySet()) { oprot.writeString(_iter868.getKey()); oprot.writeString(_iter868.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class partition_name_to_spec_resultTupleSchemeFactory implements SchemeFactory { public partition_name_to_spec_resultTupleScheme getScheme() { return new partition_name_to_spec_resultTupleScheme(); } } private static class partition_name_to_spec_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry _iter869 : struct.success.entrySet()) { oprot.writeString(_iter869.getKey()); oprot.writeString(_iter869.getValue()); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_to_spec_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map870 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new HashMap(2*_map870.size); for (int _i871 = 0; _i871 < _map870.size; ++_i871) { String _key872; // required String _val873; // required _key872 = iprot.readString(); _val873 = iprot.readString(); struct.success.put(_key872, _val873); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class markPartitionForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new markPartitionForEvent_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new markPartitionForEvent_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private Map part_vals; // required private PartitionEventType eventType; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), /** * * @see PartitionEventType */ EVENT_TYPE((short)4, "eventType"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // EVENT_TYPE return EVENT_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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)))); tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPartitionForEvent_args.class, metaDataMap); } public markPartitionForEvent_args() { } public markPartitionForEvent_args( String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.eventType = eventType; } /** * Performs a deep copy on other. */ public markPartitionForEvent_args(markPartitionForEvent_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { Map __this__part_vals = new HashMap(); for (Map.Entry other_element : other.part_vals.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__part_vals_copy_key = other_element_key; String __this__part_vals_copy_value = other_element_value; __this__part_vals.put(__this__part_vals_copy_key, __this__part_vals_copy_value); } this.part_vals = __this__part_vals; } if (other.isSetEventType()) { this.eventType = other.eventType; } } public markPartitionForEvent_args deepCopy() { return new markPartitionForEvent_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.eventType = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public void putToPart_vals(String key, String val) { if (this.part_vals == null) { this.part_vals = new HashMap(); } this.part_vals.put(key, val); } public Map getPart_vals() { return this.part_vals; } public void setPart_vals(Map part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } /** * * @see PartitionEventType */ public PartitionEventType getEventType() { return this.eventType; } /** * * @see PartitionEventType */ public void setEventType(PartitionEventType eventType) { this.eventType = eventType; } public void unsetEventType() { this.eventType = null; } /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ public boolean isSetEventType() { return this.eventType != null; } public void setEventTypeIsSet(boolean value) { if (!value) { this.eventType = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((Map)value); } break; case EVENT_TYPE: if (value == null) { unsetEventType(); } else { setEventType((PartitionEventType)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case EVENT_TYPE: return getEventType(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case EVENT_TYPE: return isSetEventType(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof markPartitionForEvent_args) return this.equals((markPartitionForEvent_args)that); return false; } public boolean equals(markPartitionForEvent_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_eventType = true && this.isSetEventType(); boolean that_present_eventType = true && that.isSetEventType(); if (this_present_eventType || that_present_eventType) { if (!(this_present_eventType && that_present_eventType)) return false; if (!this.eventType.equals(that.eventType)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_eventType = true && (isSetEventType()); builder.append(present_eventType); if (present_eventType) builder.append(eventType.getValue()); return builder.toHashCode(); } public int compareTo(markPartitionForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; markPartitionForEvent_args typedOther = (markPartitionForEvent_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(typedOther.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, typedOther.eventType); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("markPartitionForEvent_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("eventType:"); if (this.eventType == null) { sb.append("null"); } else { sb.append(this.eventType); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class markPartitionForEvent_argsStandardSchemeFactory implements SchemeFactory { public markPartitionForEvent_argsStandardScheme getScheme() { return new markPartitionForEvent_argsStandardScheme(); } } private static class markPartitionForEvent_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map874 = iprot.readMapBegin(); struct.part_vals = new HashMap(2*_map874.size); for (int _i875 = 0; _i875 < _map874.size; ++_i875) { String _key876; // required String _val877; // required _key876 = iprot.readString(); _val877 = iprot.readString(); struct.part_vals.put(_key876, _val877); } iprot.readMapEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // EVENT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.eventType = PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (Map.Entry _iter878 : struct.part_vals.entrySet()) { oprot.writeString(_iter878.getKey()); oprot.writeString(_iter878.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.eventType != null) { oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); oprot.writeI32(struct.eventType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class markPartitionForEvent_argsTupleSchemeFactory implements SchemeFactory { public markPartitionForEvent_argsTupleScheme getScheme() { return new markPartitionForEvent_argsTupleScheme(); } } private static class markPartitionForEvent_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetEventType()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (Map.Entry _iter879 : struct.part_vals.entrySet()) { oprot.writeString(_iter879.getKey()); oprot.writeString(_iter879.getValue()); } } } if (struct.isSetEventType()) { oprot.writeI32(struct.eventType.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map880 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new HashMap(2*_map880.size); for (int _i881 = 0; _i881 < _map880.size; ++_i881) { String _key882; // required String _val883; // required _key882 = iprot.readString(); _val883 = iprot.readString(); struct.part_vals.put(_key882, _val883); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.eventType = PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } } } } public static class markPartitionForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new markPartitionForEvent_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new markPartitionForEvent_resultTupleSchemeFactory()); } private MetaException o1; // required private NoSuchObjectException o2; // required private UnknownDBException o3; // required private UnknownTableException o4; // required private UnknownPartitionException o5; // required private InvalidPartitionException o6; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"), O5((short)5, "o5"), O6((short)6, "o6"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; case 5: // O5 return O5; case 6: // O6 return O6; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", 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(markPartitionForEvent_result.class, metaDataMap); } public markPartitionForEvent_result() { } public markPartitionForEvent_result( MetaException o1, NoSuchObjectException o2, UnknownDBException o3, UnknownTableException o4, UnknownPartitionException o5, InvalidPartitionException o6) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; this.o5 = o5; this.o6 = o6; } /** * Performs a deep copy on other. */ public markPartitionForEvent_result(markPartitionForEvent_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } if (other.isSetO4()) { this.o4 = new UnknownTableException(other.o4); } if (other.isSetO5()) { this.o5 = new UnknownPartitionException(other.o5); } if (other.isSetO6()) { this.o6 = new InvalidPartitionException(other.o6); } } public markPartitionForEvent_result deepCopy() { return new markPartitionForEvent_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; this.o5 = null; this.o6 = null; } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public UnknownTableException getO4() { return this.o4; } public void setO4(UnknownTableException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public UnknownPartitionException getO5() { return this.o5; } public void setO5(UnknownPartitionException o5) { this.o5 = o5; } public void unsetO5() { this.o5 = null; } /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ public boolean isSetO5() { return this.o5 != null; } public void setO5IsSet(boolean value) { if (!value) { this.o5 = null; } } public InvalidPartitionException getO6() { return this.o6; } public void setO6(InvalidPartitionException o6) { this.o6 = o6; } public void unsetO6() { this.o6 = null; } /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ public boolean isSetO6() { return this.o6 != null; } public void setO6IsSet(boolean value) { if (!value) { this.o6 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((UnknownTableException)value); } break; case O5: if (value == null) { unsetO5(); } else { setO5((UnknownPartitionException)value); } break; case O6: if (value == null) { unsetO6(); } else { setO6((InvalidPartitionException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); case O5: return getO5(); case O6: return getO6(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); case O5: return isSetO5(); case O6: return isSetO6(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof markPartitionForEvent_result) return this.equals((markPartitionForEvent_result)that); return false; } public boolean equals(markPartitionForEvent_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } boolean this_present_o5 = true && this.isSetO5(); boolean that_present_o5 = true && that.isSetO5(); if (this_present_o5 || that_present_o5) { if (!(this_present_o5 && that_present_o5)) return false; if (!this.o5.equals(that.o5)) return false; } boolean this_present_o6 = true && this.isSetO6(); boolean that_present_o6 = true && that.isSetO6(); if (this_present_o6 || that_present_o6) { if (!(this_present_o6 && that_present_o6)) return false; if (!this.o6.equals(that.o6)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); boolean present_o5 = true && (isSetO5()); builder.append(present_o5); if (present_o5) builder.append(o5); boolean present_o6 = true && (isSetO6()); builder.append(present_o6); if (present_o6) builder.append(o6); return builder.toHashCode(); } public int compareTo(markPartitionForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; markPartitionForEvent_result typedOther = (markPartitionForEvent_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(typedOther.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, typedOther.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(typedOther.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, typedOther.o6); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("markPartitionForEvent_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; if (!first) sb.append(", "); sb.append("o5:"); if (this.o5 == null) { sb.append("null"); } else { sb.append(this.o5); } first = false; if (!first) sb.append(", "); sb.append("o6:"); if (this.o6 == null) { sb.append("null"); } else { sb.append(this.o6); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class markPartitionForEvent_resultStandardSchemeFactory implements SchemeFactory { public markPartitionForEvent_resultStandardScheme getScheme() { return new markPartitionForEvent_resultStandardScheme(); } } private static class markPartitionForEvent_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new UnknownTableException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // O5 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o5 = new UnknownPartitionException(); struct.o5.read(iprot); struct.setO5IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // O6 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o6 = new InvalidPartitionException(); struct.o6.read(iprot); struct.setO6IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } if (struct.o5 != null) { oprot.writeFieldBegin(O5_FIELD_DESC); struct.o5.write(oprot); oprot.writeFieldEnd(); } if (struct.o6 != null) { oprot.writeFieldBegin(O6_FIELD_DESC); struct.o6.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class markPartitionForEvent_resultTupleSchemeFactory implements SchemeFactory { public markPartitionForEvent_resultTupleScheme getScheme() { return new markPartitionForEvent_resultTupleScheme(); } } private static class markPartitionForEvent_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } if (struct.isSetO4()) { optionals.set(3); } if (struct.isSetO5()) { optionals.set(4); } if (struct.isSetO6()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } if (struct.isSetO5()) { struct.o5.write(oprot); } if (struct.isSetO6()) { struct.o6.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, markPartitionForEvent_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(3)) { struct.o4 = new UnknownTableException(); struct.o4.read(iprot); struct.setO4IsSet(true); } if (incoming.get(4)) { struct.o5 = new UnknownPartitionException(); struct.o5.read(iprot); struct.setO5IsSet(true); } if (incoming.get(5)) { struct.o6 = new InvalidPartitionException(); struct.o6.read(iprot); struct.setO6IsSet(true); } } } } public static class isPartitionMarkedForEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private Map part_vals; // required private PartitionEventType eventType; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_VALS((short)3, "part_vals"), /** * * @see PartitionEventType */ EVENT_TYPE((short)4, "eventType"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_VALS return PART_VALS; case 4: // EVENT_TYPE return EVENT_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", 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)))); tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPartitionMarkedForEvent_args.class, metaDataMap); } public isPartitionMarkedForEvent_args() { } public isPartitionMarkedForEvent_args( String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; this.eventType = eventType; } /** * Performs a deep copy on other. */ public isPartitionMarkedForEvent_args(isPartitionMarkedForEvent_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_vals()) { Map __this__part_vals = new HashMap(); for (Map.Entry other_element : other.part_vals.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__part_vals_copy_key = other_element_key; String __this__part_vals_copy_value = other_element_value; __this__part_vals.put(__this__part_vals_copy_key, __this__part_vals_copy_value); } this.part_vals = __this__part_vals; } if (other.isSetEventType()) { this.eventType = other.eventType; } } public isPartitionMarkedForEvent_args deepCopy() { return new isPartitionMarkedForEvent_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.eventType = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public void putToPart_vals(String key, String val) { if (this.part_vals == null) { this.part_vals = new HashMap(); } this.part_vals.put(key, val); } public Map getPart_vals() { return this.part_vals; } public void setPart_vals(Map part_vals) { this.part_vals = part_vals; } public void unsetPart_vals() { this.part_vals = null; } /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } public void setPart_valsIsSet(boolean value) { if (!value) { this.part_vals = null; } } /** * * @see PartitionEventType */ public PartitionEventType getEventType() { return this.eventType; } /** * * @see PartitionEventType */ public void setEventType(PartitionEventType eventType) { this.eventType = eventType; } public void unsetEventType() { this.eventType = null; } /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ public boolean isSetEventType() { return this.eventType != null; } public void setEventTypeIsSet(boolean value) { if (!value) { this.eventType = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_VALS: if (value == null) { unsetPart_vals(); } else { setPart_vals((Map)value); } break; case EVENT_TYPE: if (value == null) { unsetEventType(); } else { setEventType((PartitionEventType)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_VALS: return getPart_vals(); case EVENT_TYPE: return getEventType(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case EVENT_TYPE: return isSetEventType(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof isPartitionMarkedForEvent_args) return this.equals((isPartitionMarkedForEvent_args)that); return false; } public boolean equals(isPartitionMarkedForEvent_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_eventType = true && this.isSetEventType(); boolean that_present_eventType = true && that.isSetEventType(); if (this_present_eventType || that_present_eventType) { if (!(this_present_eventType && that_present_eventType)) return false; if (!this.eventType.equals(that.eventType)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); builder.append(present_part_vals); if (present_part_vals) builder.append(part_vals); boolean present_eventType = true && (isSetEventType()); builder.append(present_eventType); if (present_eventType) builder.append(eventType.getValue()); return builder.toHashCode(); } public int compareTo(isPartitionMarkedForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; isPartitionMarkedForEvent_args typedOther = (isPartitionMarkedForEvent_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(typedOther.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, typedOther.eventType); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("isPartitionMarkedForEvent_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_vals:"); if (this.part_vals == null) { sb.append("null"); } else { sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); sb.append("eventType:"); if (this.eventType == null) { sb.append("null"); } else { sb.append(this.eventType); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class isPartitionMarkedForEvent_argsStandardSchemeFactory implements SchemeFactory { public isPartitionMarkedForEvent_argsStandardScheme getScheme() { return new isPartitionMarkedForEvent_argsStandardScheme(); } } private static class isPartitionMarkedForEvent_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_VALS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map884 = iprot.readMapBegin(); struct.part_vals = new HashMap(2*_map884.size); for (int _i885 = 0; _i885 < _map884.size; ++_i885) { String _key886; // required String _val887; // required _key886 = iprot.readString(); _val887 = iprot.readString(); struct.part_vals.put(_key886, _val887); } iprot.readMapEnd(); } struct.setPart_valsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // EVENT_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.eventType = PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.part_vals.size())); for (Map.Entry _iter888 : struct.part_vals.entrySet()) { oprot.writeString(_iter888.getKey()); oprot.writeString(_iter888.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.eventType != null) { oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); oprot.writeI32(struct.eventType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class isPartitionMarkedForEvent_argsTupleSchemeFactory implements SchemeFactory { public isPartitionMarkedForEvent_argsTupleScheme getScheme() { return new isPartitionMarkedForEvent_argsTupleScheme(); } } private static class isPartitionMarkedForEvent_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_vals()) { optionals.set(2); } if (struct.isSetEventType()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_vals()) { { oprot.writeI32(struct.part_vals.size()); for (Map.Entry _iter889 : struct.part_vals.entrySet()) { oprot.writeString(_iter889.getKey()); oprot.writeString(_iter889.getValue()); } } } if (struct.isSetEventType()) { oprot.writeI32(struct.eventType.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map890 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new HashMap(2*_map890.size); for (int _i891 = 0; _i891 < _map890.size; ++_i891) { String _key892; // required String _val893; // required _key892 = iprot.readString(); _val893 = iprot.readString(); struct.part_vals.put(_key892, _val893); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.eventType = PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } } } } public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new isPartitionMarkedForEvent_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new isPartitionMarkedForEvent_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // required private NoSuchObjectException o2; // required private UnknownDBException o3; // required private UnknownTableException o4; // required private UnknownPartitionException o5; // required private InvalidPartitionException o6; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"), O5((short)5, "o5"), O6((short)6, "o6"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; case 5: // O5 return O5; case 6: // O6 return O6; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", 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(isPartitionMarkedForEvent_result.class, metaDataMap); } public isPartitionMarkedForEvent_result() { } public isPartitionMarkedForEvent_result( boolean success, MetaException o1, NoSuchObjectException o2, UnknownDBException o3, UnknownTableException o4, UnknownPartitionException o5, InvalidPartitionException o6) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; this.o5 = o5; this.o6 = o6; } /** * Performs a deep copy on other. */ public isPartitionMarkedForEvent_result(isPartitionMarkedForEvent_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } if (other.isSetO4()) { this.o4 = new UnknownTableException(other.o4); } if (other.isSetO5()) { this.o5 = new UnknownPartitionException(other.o5); } if (other.isSetO6()) { this.o6 = new InvalidPartitionException(other.o6); } } public isPartitionMarkedForEvent_result deepCopy() { return new isPartitionMarkedForEvent_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; this.o5 = null; this.o6 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public UnknownTableException getO4() { return this.o4; } public void setO4(UnknownTableException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public UnknownPartitionException getO5() { return this.o5; } public void setO5(UnknownPartitionException o5) { this.o5 = o5; } public void unsetO5() { this.o5 = null; } /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ public boolean isSetO5() { return this.o5 != null; } public void setO5IsSet(boolean value) { if (!value) { this.o5 = null; } } public InvalidPartitionException getO6() { return this.o6; } public void setO6(InvalidPartitionException o6) { this.o6 = o6; } public void unsetO6() { this.o6 = null; } /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ public boolean isSetO6() { return this.o6 != null; } public void setO6IsSet(boolean value) { if (!value) { this.o6 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((UnknownTableException)value); } break; case O5: if (value == null) { unsetO5(); } else { setO5((UnknownPartitionException)value); } break; case O6: if (value == null) { unsetO6(); } else { setO6((InvalidPartitionException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); case O5: return getO5(); case O6: return getO6(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); case O5: return isSetO5(); case O6: return isSetO6(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof isPartitionMarkedForEvent_result) return this.equals((isPartitionMarkedForEvent_result)that); return false; } public boolean equals(isPartitionMarkedForEvent_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } boolean this_present_o5 = true && this.isSetO5(); boolean that_present_o5 = true && that.isSetO5(); if (this_present_o5 || that_present_o5) { if (!(this_present_o5 && that_present_o5)) return false; if (!this.o5.equals(that.o5)) return false; } boolean this_present_o6 = true && this.isSetO6(); boolean that_present_o6 = true && that.isSetO6(); if (this_present_o6 || that_present_o6) { if (!(this_present_o6 && that_present_o6)) return false; if (!this.o6.equals(that.o6)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); boolean present_o5 = true && (isSetO5()); builder.append(present_o5); if (present_o5) builder.append(o5); boolean present_o6 = true && (isSetO6()); builder.append(present_o6); if (present_o6) builder.append(o6); return builder.toHashCode(); } public int compareTo(isPartitionMarkedForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; isPartitionMarkedForEvent_result typedOther = (isPartitionMarkedForEvent_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(typedOther.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, typedOther.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(typedOther.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, typedOther.o6); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("isPartitionMarkedForEvent_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; if (!first) sb.append(", "); sb.append("o5:"); if (this.o5 == null) { sb.append("null"); } else { sb.append(this.o5); } first = false; if (!first) sb.append(", "); sb.append("o6:"); if (this.o6 == null) { sb.append("null"); } else { sb.append(this.o6); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class isPartitionMarkedForEvent_resultStandardSchemeFactory implements SchemeFactory { public isPartitionMarkedForEvent_resultStandardScheme getScheme() { return new isPartitionMarkedForEvent_resultStandardScheme(); } } private static class isPartitionMarkedForEvent_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new UnknownTableException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // O5 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o5 = new UnknownPartitionException(); struct.o5.read(iprot); struct.setO5IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // O6 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o6 = new InvalidPartitionException(); struct.o6.read(iprot); struct.setO6IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } if (struct.o5 != null) { oprot.writeFieldBegin(O5_FIELD_DESC); struct.o5.write(oprot); oprot.writeFieldEnd(); } if (struct.o6 != null) { oprot.writeFieldBegin(O6_FIELD_DESC); struct.o6.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class isPartitionMarkedForEvent_resultTupleSchemeFactory implements SchemeFactory { public isPartitionMarkedForEvent_resultTupleScheme getScheme() { return new isPartitionMarkedForEvent_resultTupleScheme(); } } private static class isPartitionMarkedForEvent_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } if (struct.isSetO5()) { optionals.set(5); } if (struct.isSetO6()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } if (struct.isSetO5()) { struct.o5.write(oprot); } if (struct.isSetO6()) { struct.o6.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, isPartitionMarkedForEvent_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new UnknownDBException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new UnknownTableException(); struct.o4.read(iprot); struct.setO4IsSet(true); } if (incoming.get(5)) { struct.o5 = new UnknownPartitionException(); struct.o5.read(iprot); struct.setO5IsSet(true); } if (incoming.get(6)) { struct.o6 = new InvalidPartitionException(); struct.o6.read(iprot); struct.setO6IsSet(true); } } } } public static class add_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_args"); private static final org.apache.thrift.protocol.TField NEW_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_index", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField INDEX_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_table", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_index_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_index_argsTupleSchemeFactory()); } private Index new_index; // required private Table index_table; // 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 { NEW_INDEX((short)1, "new_index"), INDEX_TABLE((short)2, "index_table"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // NEW_INDEX return NEW_INDEX; case 2: // INDEX_TABLE return INDEX_TABLE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.NEW_INDEX, new org.apache.thrift.meta_data.FieldMetaData("new_index", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); tmpMap.put(_Fields.INDEX_TABLE, new org.apache.thrift.meta_data.FieldMetaData("index_table", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } public add_index_args() { } public add_index_args( Index new_index, Table index_table) { this(); this.new_index = new_index; this.index_table = index_table; } /** * Performs a deep copy on other. */ public add_index_args(add_index_args other) { if (other.isSetNew_index()) { this.new_index = new Index(other.new_index); } if (other.isSetIndex_table()) { this.index_table = new Table(other.index_table); } } public add_index_args deepCopy() { return new add_index_args(this); } @Override public void clear() { this.new_index = null; this.index_table = null; } public Index getNew_index() { return this.new_index; } public void setNew_index(Index new_index) { this.new_index = new_index; } public void unsetNew_index() { this.new_index = null; } /** Returns true if field new_index is set (has been assigned a value) and false otherwise */ public boolean isSetNew_index() { return this.new_index != null; } public void setNew_indexIsSet(boolean value) { if (!value) { this.new_index = null; } } public Table getIndex_table() { return this.index_table; } public void setIndex_table(Table index_table) { this.index_table = index_table; } public void unsetIndex_table() { this.index_table = null; } /** Returns true if field index_table is set (has been assigned a value) and false otherwise */ public boolean isSetIndex_table() { return this.index_table != null; } public void setIndex_tableIsSet(boolean value) { if (!value) { this.index_table = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NEW_INDEX: if (value == null) { unsetNew_index(); } else { setNew_index((Index)value); } break; case INDEX_TABLE: if (value == null) { unsetIndex_table(); } else { setIndex_table((Table)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NEW_INDEX: return getNew_index(); case INDEX_TABLE: return getIndex_table(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 NEW_INDEX: return isSetNew_index(); case INDEX_TABLE: return isSetIndex_table(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_index_args) return this.equals((add_index_args)that); return false; } public boolean equals(add_index_args that) { if (that == null) return false; boolean this_present_new_index = true && this.isSetNew_index(); boolean that_present_new_index = true && that.isSetNew_index(); if (this_present_new_index || that_present_new_index) { if (!(this_present_new_index && that_present_new_index)) return false; if (!this.new_index.equals(that.new_index)) return false; } boolean this_present_index_table = true && this.isSetIndex_table(); boolean that_present_index_table = true && that.isSetIndex_table(); if (this_present_index_table || that_present_index_table) { if (!(this_present_index_table && that_present_index_table)) return false; if (!this.index_table.equals(that.index_table)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_new_index = true && (isSetNew_index()); builder.append(present_new_index); if (present_new_index) builder.append(new_index); boolean present_index_table = true && (isSetIndex_table()); builder.append(present_index_table); if (present_index_table) builder.append(index_table); return builder.toHashCode(); } public int compareTo(add_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_index_args typedOther = (add_index_args)other; lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_index()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_index, typedOther.new_index); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_table()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_table, typedOther.index_table); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_index_args("); boolean first = true; sb.append("new_index:"); if (this.new_index == null) { sb.append("null"); } else { sb.append(this.new_index); } first = false; if (!first) sb.append(", "); sb.append("index_table:"); if (this.index_table == null) { sb.append("null"); } else { sb.append(this.index_table); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_index != null) { new_index.validate(); } if (index_table != null) { index_table.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_index_argsStandardSchemeFactory implements SchemeFactory { public add_index_argsStandardScheme getScheme() { return new add_index_argsStandardScheme(); } } private static class add_index_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NEW_INDEX if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_index = new Index(); struct.new_index.read(iprot); struct.setNew_indexIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // INDEX_TABLE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.index_table = new Table(); struct.index_table.read(iprot); struct.setIndex_tableIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.new_index != null) { oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); struct.new_index.write(oprot); oprot.writeFieldEnd(); } if (struct.index_table != null) { oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); struct.index_table.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_index_argsTupleSchemeFactory implements SchemeFactory { public add_index_argsTupleScheme getScheme() { return new add_index_argsTupleScheme(); } } private static class add_index_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNew_index()) { optionals.set(0); } if (struct.isSetIndex_table()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetNew_index()) { struct.new_index.write(oprot); } if (struct.isSetIndex_table()) { struct.index_table.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.new_index = new Index(); struct.new_index.read(iprot); struct.setNew_indexIsSet(true); } if (incoming.get(1)) { struct.index_table = new Table(); struct.index_table.read(iprot); struct.setIndex_tableIsSet(true); } } } } public static class add_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_index_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_index_resultTupleSchemeFactory()); } private Index success; // required private InvalidObjectException o1; // required private AlreadyExistsException o2; // required private MetaException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Index.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(add_index_result.class, metaDataMap); } public add_index_result() { } public add_index_result( Index success, InvalidObjectException o1, AlreadyExistsException o2, MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public add_index_result(add_index_result other) { if (other.isSetSuccess()) { this.success = new Index(other.success); } if (other.isSetO1()) { this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public add_index_result deepCopy() { return new add_index_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public Index getSuccess() { return this.success; } public void setSuccess(Index 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 InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Index)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_index_result) return this.equals((add_index_result)that); return false; } public boolean equals(add_index_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(add_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_index_result typedOther = (add_index_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_index_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_index_resultStandardSchemeFactory implements SchemeFactory { public add_index_resultStandardScheme getScheme() { return new add_index_resultStandardScheme(); } } private static class add_index_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Index(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_index_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_index_resultTupleSchemeFactory implements SchemeFactory { public add_index_resultTupleScheme getScheme() { return new add_index_resultTupleScheme(); } } private static class add_index_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new Index(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new InvalidObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new AlreadyExistsException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class alter_index_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField BASE_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField IDX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("idx_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField NEW_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_idx", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_index_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_index_argsTupleSchemeFactory()); } private String dbname; // required private String base_tbl_name; // required private String idx_name; // required private Index new_idx; // 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 { DBNAME((short)1, "dbname"), BASE_TBL_NAME((short)2, "base_tbl_name"), IDX_NAME((short)3, "idx_name"), NEW_IDX((short)4, "new_idx"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DBNAME return DBNAME; case 2: // BASE_TBL_NAME return BASE_TBL_NAME; case 3: // IDX_NAME return IDX_NAME; case 4: // NEW_IDX return NEW_IDX; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.BASE_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("base_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IDX_NAME, new org.apache.thrift.meta_data.FieldMetaData("idx_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_IDX, new org.apache.thrift.meta_data.FieldMetaData("new_idx", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); } public alter_index_args() { } public alter_index_args( String dbname, String base_tbl_name, String idx_name, Index new_idx) { this(); this.dbname = dbname; this.base_tbl_name = base_tbl_name; this.idx_name = idx_name; this.new_idx = new_idx; } /** * Performs a deep copy on other. */ public alter_index_args(alter_index_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetBase_tbl_name()) { this.base_tbl_name = other.base_tbl_name; } if (other.isSetIdx_name()) { this.idx_name = other.idx_name; } if (other.isSetNew_idx()) { this.new_idx = new Index(other.new_idx); } } public alter_index_args deepCopy() { return new alter_index_args(this); } @Override public void clear() { this.dbname = null; this.base_tbl_name = null; this.idx_name = null; this.new_idx = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public String getBase_tbl_name() { return this.base_tbl_name; } public void setBase_tbl_name(String base_tbl_name) { this.base_tbl_name = base_tbl_name; } public void unsetBase_tbl_name() { this.base_tbl_name = null; } /** Returns true if field base_tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetBase_tbl_name() { return this.base_tbl_name != null; } public void setBase_tbl_nameIsSet(boolean value) { if (!value) { this.base_tbl_name = null; } } public String getIdx_name() { return this.idx_name; } public void setIdx_name(String idx_name) { this.idx_name = idx_name; } public void unsetIdx_name() { this.idx_name = null; } /** Returns true if field idx_name is set (has been assigned a value) and false otherwise */ public boolean isSetIdx_name() { return this.idx_name != null; } public void setIdx_nameIsSet(boolean value) { if (!value) { this.idx_name = null; } } public Index getNew_idx() { return this.new_idx; } public void setNew_idx(Index new_idx) { this.new_idx = new_idx; } public void unsetNew_idx() { this.new_idx = null; } /** Returns true if field new_idx is set (has been assigned a value) and false otherwise */ public boolean isSetNew_idx() { return this.new_idx != null; } public void setNew_idxIsSet(boolean value) { if (!value) { this.new_idx = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case BASE_TBL_NAME: if (value == null) { unsetBase_tbl_name(); } else { setBase_tbl_name((String)value); } break; case IDX_NAME: if (value == null) { unsetIdx_name(); } else { setIdx_name((String)value); } break; case NEW_IDX: if (value == null) { unsetNew_idx(); } else { setNew_idx((Index)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case BASE_TBL_NAME: return getBase_tbl_name(); case IDX_NAME: return getIdx_name(); case NEW_IDX: return getNew_idx(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DBNAME: return isSetDbname(); case BASE_TBL_NAME: return isSetBase_tbl_name(); case IDX_NAME: return isSetIdx_name(); case NEW_IDX: return isSetNew_idx(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_index_args) return this.equals((alter_index_args)that); return false; } public boolean equals(alter_index_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); if (this_present_base_tbl_name || that_present_base_tbl_name) { if (!(this_present_base_tbl_name && that_present_base_tbl_name)) return false; if (!this.base_tbl_name.equals(that.base_tbl_name)) return false; } boolean this_present_idx_name = true && this.isSetIdx_name(); boolean that_present_idx_name = true && that.isSetIdx_name(); if (this_present_idx_name || that_present_idx_name) { if (!(this_present_idx_name && that_present_idx_name)) return false; if (!this.idx_name.equals(that.idx_name)) return false; } boolean this_present_new_idx = true && this.isSetNew_idx(); boolean that_present_new_idx = true && that.isSetNew_idx(); if (this_present_new_idx || that_present_new_idx) { if (!(this_present_new_idx && that_present_new_idx)) return false; if (!this.new_idx.equals(that.new_idx)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbname = true && (isSetDbname()); builder.append(present_dbname); if (present_dbname) builder.append(dbname); boolean present_base_tbl_name = true && (isSetBase_tbl_name()); builder.append(present_base_tbl_name); if (present_base_tbl_name) builder.append(base_tbl_name); boolean present_idx_name = true && (isSetIdx_name()); builder.append(present_idx_name); if (present_idx_name) builder.append(idx_name); boolean present_new_idx = true && (isSetNew_idx()); builder.append(present_new_idx); if (present_new_idx) builder.append(new_idx); return builder.toHashCode(); } public int compareTo(alter_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_index_args typedOther = (alter_index_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetBase_tbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIdx_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_idx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_index_args("); boolean first = true; sb.append("dbname:"); if (this.dbname == null) { sb.append("null"); } else { sb.append(this.dbname); } first = false; if (!first) sb.append(", "); sb.append("base_tbl_name:"); if (this.base_tbl_name == null) { sb.append("null"); } else { sb.append(this.base_tbl_name); } first = false; if (!first) sb.append(", "); sb.append("idx_name:"); if (this.idx_name == null) { sb.append("null"); } else { sb.append(this.idx_name); } first = false; if (!first) sb.append(", "); sb.append("new_idx:"); if (this.new_idx == null) { sb.append("null"); } else { sb.append(this.new_idx); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (new_idx != null) { new_idx.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_index_argsStandardSchemeFactory implements SchemeFactory { public alter_index_argsStandardScheme getScheme() { return new alter_index_argsStandardScheme(); } } private static class alter_index_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DBNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // BASE_TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.base_tbl_name = iprot.readString(); struct.setBase_tbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // IDX_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.idx_name = iprot.readString(); struct.setIdx_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NEW_IDX if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.new_idx = new Index(); struct.new_idx.read(iprot); struct.setNew_idxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.base_tbl_name != null) { oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); oprot.writeString(struct.base_tbl_name); oprot.writeFieldEnd(); } if (struct.idx_name != null) { oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); oprot.writeString(struct.idx_name); oprot.writeFieldEnd(); } if (struct.new_idx != null) { oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); struct.new_idx.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_index_argsTupleSchemeFactory implements SchemeFactory { public alter_index_argsTupleScheme getScheme() { return new alter_index_argsTupleScheme(); } } private static class alter_index_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbname()) { optionals.set(0); } if (struct.isSetBase_tbl_name()) { optionals.set(1); } if (struct.isSetIdx_name()) { optionals.set(2); } if (struct.isSetNew_idx()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDbname()) { oprot.writeString(struct.dbname); } if (struct.isSetBase_tbl_name()) { oprot.writeString(struct.base_tbl_name); } if (struct.isSetIdx_name()) { oprot.writeString(struct.idx_name); } if (struct.isSetNew_idx()) { struct.new_idx.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.dbname = iprot.readString(); struct.setDbnameIsSet(true); } if (incoming.get(1)) { struct.base_tbl_name = iprot.readString(); struct.setBase_tbl_nameIsSet(true); } if (incoming.get(2)) { struct.idx_name = iprot.readString(); struct.setIdx_nameIsSet(true); } if (incoming.get(3)) { struct.new_idx = new Index(); struct.new_idx.read(iprot); struct.setNew_idxIsSet(true); } } } } public static class alter_index_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_index_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_index_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_index_result.class, metaDataMap); } public alter_index_result() { } public alter_index_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_index_result(alter_index_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_index_result deepCopy() { return new alter_index_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_index_result) return this.equals((alter_index_result)that); return false; } public boolean equals(alter_index_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_index_result typedOther = (alter_index_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_index_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_index_resultStandardSchemeFactory implements SchemeFactory { public alter_index_resultStandardScheme getScheme() { return new alter_index_resultStandardScheme(); } } private static class alter_index_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_index_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_index_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_index_resultTupleSchemeFactory implements SchemeFactory { public alter_index_resultTupleScheme getScheme() { return new alter_index_resultTupleScheme(); } } private static class alter_index_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_index_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_index_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_index_by_name_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String index_name; // required private boolean deleteData; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), INDEX_NAME((short)3, "index_name"), DELETE_DATA((short)4, "deleteData"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // INDEX_NAME return INDEX_NAME; case 4: // DELETE_DATA return DELETE_DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __DELETEDATA_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", 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(drop_index_by_name_args.class, metaDataMap); } public drop_index_by_name_args() { } public drop_index_by_name_args( String db_name, String tbl_name, String index_name, boolean deleteData) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.index_name = index_name; this.deleteData = deleteData; setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_index_by_name_args(drop_index_by_name_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetIndex_name()) { this.index_name = other.index_name; } this.deleteData = other.deleteData; } public drop_index_by_name_args deepCopy() { return new drop_index_by_name_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.index_name = null; setDeleteDataIsSet(false); this.deleteData = false; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getIndex_name() { return this.index_name; } public void setIndex_name(String index_name) { this.index_name = index_name; } public void unsetIndex_name() { this.index_name = null; } /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ public boolean isSetIndex_name() { return this.index_name != null; } public void setIndex_nameIsSet(boolean value) { if (!value) { this.index_name = null; } } public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; setDeleteDataIsSet(true); } public void unsetDeleteData() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case INDEX_NAME: if (value == null) { unsetIndex_name(); } else { setIndex_name((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case INDEX_NAME: return getIndex_name(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case INDEX_NAME: return isSetIndex_name(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_index_by_name_args) return this.equals((drop_index_by_name_args)that); return false; } public boolean equals(drop_index_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_index_name = true && this.isSetIndex_name(); boolean that_present_index_name = true && that.isSetIndex_name(); if (this_present_index_name || that_present_index_name) { if (!(this_present_index_name && that_present_index_name)) return false; if (!this.index_name.equals(that.index_name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_index_name = true && (isSetIndex_name()); builder.append(present_index_name); if (present_index_name) builder.append(index_name); boolean present_deleteData = true; builder.append(present_deleteData); if (present_deleteData) builder.append(deleteData); return builder.toHashCode(); } public int compareTo(drop_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_index_by_name_args typedOther = (drop_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_index_by_name_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("index_name:"); if (this.index_name == null) { sb.append("null"); } else { sb.append(this.index_name); } first = false; if (!first) sb.append(", "); sb.append("deleteData:"); sb.append(this.deleteData); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_index_by_name_argsStandardSchemeFactory implements SchemeFactory { public drop_index_by_name_argsStandardScheme getScheme() { return new drop_index_by_name_argsStandardScheme(); } } private static class drop_index_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // INDEX_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.index_name = iprot.readString(); struct.setIndex_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DELETE_DATA if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.index_name != null) { oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); oprot.writeString(struct.index_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(struct.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_index_by_name_argsTupleSchemeFactory implements SchemeFactory { public drop_index_by_name_argsTupleScheme getScheme() { return new drop_index_by_name_argsTupleScheme(); } } private static class drop_index_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetIndex_name()) { optionals.set(2); } if (struct.isSetDeleteData()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetIndex_name()) { oprot.writeString(struct.index_name); } if (struct.isSetDeleteData()) { oprot.writeBool(struct.deleteData); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.index_name = iprot.readString(); struct.setIndex_nameIsSet(true); } if (incoming.get(3)) { struct.deleteData = iprot.readBool(); struct.setDeleteDataIsSet(true); } } } } public static class drop_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_index_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_index_by_name_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(drop_index_by_name_result.class, metaDataMap); } public drop_index_by_name_result() { } public drop_index_by_name_result( boolean success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public drop_index_by_name_result(drop_index_by_name_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public drop_index_by_name_result deepCopy() { return new drop_index_by_name_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_index_by_name_result) return this.equals((drop_index_by_name_result)that); return false; } public boolean equals(drop_index_by_name_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(drop_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_index_by_name_result typedOther = (drop_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_index_by_name_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_index_by_name_resultStandardSchemeFactory implements SchemeFactory { public drop_index_by_name_resultStandardScheme getScheme() { return new drop_index_by_name_resultStandardScheme(); } } private static class drop_index_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_index_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_index_by_name_resultTupleSchemeFactory implements SchemeFactory { public drop_index_by_name_resultTupleScheme getScheme() { return new drop_index_by_name_resultTupleScheme(); } } private static class drop_index_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_index_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_index_by_name_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_index_by_name_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String index_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), INDEX_NAME((short)3, "index_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // INDEX_NAME return INDEX_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_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(get_index_by_name_args.class, metaDataMap); } public get_index_by_name_args() { } public get_index_by_name_args( String db_name, String tbl_name, String index_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.index_name = index_name; } /** * Performs a deep copy on other. */ public get_index_by_name_args(get_index_by_name_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetIndex_name()) { this.index_name = other.index_name; } } public get_index_by_name_args deepCopy() { return new get_index_by_name_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.index_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getIndex_name() { return this.index_name; } public void setIndex_name(String index_name) { this.index_name = index_name; } public void unsetIndex_name() { this.index_name = null; } /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ public boolean isSetIndex_name() { return this.index_name != null; } public void setIndex_nameIsSet(boolean value) { if (!value) { this.index_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case INDEX_NAME: if (value == null) { unsetIndex_name(); } else { setIndex_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case INDEX_NAME: return getIndex_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case INDEX_NAME: return isSetIndex_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_by_name_args) return this.equals((get_index_by_name_args)that); return false; } public boolean equals(get_index_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_index_name = true && this.isSetIndex_name(); boolean that_present_index_name = true && that.isSetIndex_name(); if (this_present_index_name || that_present_index_name) { if (!(this_present_index_name && that_present_index_name)) return false; if (!this.index_name.equals(that.index_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_index_name = true && (isSetIndex_name()); builder.append(present_index_name); if (present_index_name) builder.append(index_name); return builder.toHashCode(); } public int compareTo(get_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_by_name_args typedOther = (get_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_by_name_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("index_name:"); if (this.index_name == null) { sb.append("null"); } else { sb.append(this.index_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_index_by_name_argsStandardSchemeFactory implements SchemeFactory { public get_index_by_name_argsStandardScheme getScheme() { return new get_index_by_name_argsStandardScheme(); } } private static class get_index_by_name_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // INDEX_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.index_name = iprot.readString(); struct.setIndex_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.index_name != null) { oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); oprot.writeString(struct.index_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_index_by_name_argsTupleSchemeFactory implements SchemeFactory { public get_index_by_name_argsTupleScheme getScheme() { return new get_index_by_name_argsTupleScheme(); } } private static class get_index_by_name_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetIndex_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetIndex_name()) { oprot.writeString(struct.index_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.index_name = iprot.readString(); struct.setIndex_nameIsSet(true); } } } } public static class get_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_index_by_name_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_index_by_name_resultTupleSchemeFactory()); } private Index success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Index.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); } public get_index_by_name_result() { } public get_index_by_name_result( Index success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_index_by_name_result(get_index_by_name_result other) { if (other.isSetSuccess()) { this.success = new Index(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_index_by_name_result deepCopy() { return new get_index_by_name_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Index getSuccess() { return this.success; } public void setSuccess(Index 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Index)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_by_name_result) return this.equals((get_index_by_name_result)that); return false; } public boolean equals(get_index_by_name_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_by_name_result typedOther = (get_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_by_name_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_index_by_name_resultStandardSchemeFactory implements SchemeFactory { public get_index_by_name_resultStandardScheme getScheme() { return new get_index_by_name_resultStandardScheme(); } } private static class get_index_by_name_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_by_name_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Index(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_by_name_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_index_by_name_resultTupleSchemeFactory implements SchemeFactory { public get_index_by_name_resultTupleScheme getScheme() { return new get_index_by_name_resultTupleScheme(); } } private static class get_index_by_name_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_index_by_name_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Index(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_indexes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_indexes_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_indexes_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private short max_indexes; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_INDEXES return MAX_INDEXES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_INDEXES_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); } public get_indexes_args() { this.max_indexes = (short)-1; } public get_indexes_args( String db_name, String tbl_name, short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ public get_indexes_args(get_indexes_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_indexes = other.max_indexes; } public get_indexes_args deepCopy() { return new get_indexes_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_indexes = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_indexes() { return this.max_indexes; } public void setMax_indexes(short max_indexes) { this.max_indexes = max_indexes; setMax_indexesIsSet(true); } public void unsetMax_indexes() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_INDEXES: if (value == null) { unsetMax_indexes(); } else { setMax_indexes((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_INDEXES: return Short.valueOf(getMax_indexes()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_INDEXES: return isSetMax_indexes(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_indexes_args) return this.equals((get_indexes_args)that); return false; } public boolean equals(get_indexes_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_indexes = true; boolean that_present_max_indexes = true; if (this_present_max_indexes || that_present_max_indexes) { if (!(this_present_max_indexes && that_present_max_indexes)) return false; if (this.max_indexes != that.max_indexes) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_indexes = true; builder.append(present_max_indexes); if (present_max_indexes) builder.append(max_indexes); return builder.toHashCode(); } public int compareTo(get_indexes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_indexes_args typedOther = (get_indexes_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_indexes_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_indexes:"); sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_indexes_argsStandardSchemeFactory implements SchemeFactory { public get_indexes_argsStandardScheme getScheme() { return new get_indexes_argsStandardScheme(); } } private static class get_indexes_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_INDEXES if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_indexes = iprot.readI16(); struct.setMax_indexesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); oprot.writeI16(struct.max_indexes); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_indexes_argsTupleSchemeFactory implements SchemeFactory { public get_indexes_argsTupleScheme getScheme() { return new get_indexes_argsTupleScheme(); } } private static class get_indexes_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_indexes()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_indexes()) { oprot.writeI16(struct.max_indexes); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_indexes = iprot.readI16(); struct.setMax_indexesIsSet(true); } } } } public static class get_indexes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_indexes_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_indexes_resultTupleSchemeFactory()); } private List success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Index.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); } public get_indexes_result() { } public get_indexes_result( List success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_indexes_result(get_indexes_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Index other_element : other.success) { __this__success.add(new Index(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_indexes_result deepCopy() { return new get_indexes_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Index elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_indexes_result) return this.equals((get_indexes_result)that); return false; } public boolean equals(get_indexes_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_indexes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_indexes_result typedOther = (get_indexes_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_indexes_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_indexes_resultStandardSchemeFactory implements SchemeFactory { public get_indexes_resultStandardScheme getScheme() { return new get_indexes_resultStandardScheme(); } } private static class get_indexes_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_indexes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list894 = iprot.readListBegin(); struct.success = new ArrayList(_list894.size); for (int _i895 = 0; _i895 < _list894.size; ++_i895) { Index _elem896; // optional _elem896 = new Index(); _elem896.read(iprot); struct.success.add(_elem896); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_indexes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Index _iter897 : struct.success) { _iter897.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_indexes_resultTupleSchemeFactory implements SchemeFactory { public get_indexes_resultTupleScheme getScheme() { return new get_indexes_resultTupleScheme(); } } private static class get_indexes_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Index _iter898 : struct.success) { _iter898.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_indexes_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list899 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list899.size); for (int _i900 = 0; _i900 < _list899.size; ++_i900) { Index _elem901; // optional _elem901 = new Index(); _elem901.read(iprot); struct.success.add(_elem901); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_index_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_index_names_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_index_names_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private short max_indexes; // 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // MAX_INDEXES return MAX_INDEXES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __MAX_INDEXES_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); } public get_index_names_args() { this.max_indexes = (short)-1; } public get_index_names_args( String db_name, String tbl_name, short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ public get_index_names_args(get_index_names_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } this.max_indexes = other.max_indexes; } public get_index_names_args deepCopy() { return new get_index_names_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_indexes = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_indexes() { return this.max_indexes; } public void setMax_indexes(short max_indexes) { this.max_indexes = max_indexes; setMax_indexesIsSet(true); } public void unsetMax_indexes() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ public boolean isSetMax_indexes() { return EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_INDEXES: if (value == null) { unsetMax_indexes(); } else { setMax_indexes((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_INDEXES: return Short.valueOf(getMax_indexes()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_INDEXES: return isSetMax_indexes(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_names_args) return this.equals((get_index_names_args)that); return false; } public boolean equals(get_index_names_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_indexes = true; boolean that_present_max_indexes = true; if (this_present_max_indexes || that_present_max_indexes) { if (!(this_present_max_indexes && that_present_max_indexes)) return false; if (this.max_indexes != that.max_indexes) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_max_indexes = true; builder.append(present_max_indexes); if (present_max_indexes) builder.append(max_indexes); return builder.toHashCode(); } public int compareTo(get_index_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_names_args typedOther = (get_index_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_names_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("max_indexes:"); sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_index_names_argsStandardSchemeFactory implements SchemeFactory { public get_index_names_argsStandardScheme getScheme() { return new get_index_names_argsStandardScheme(); } } private static class get_index_names_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_INDEXES if (schemeField.type == org.apache.thrift.protocol.TType.I16) { struct.max_indexes = iprot.readI16(); struct.setMax_indexesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); oprot.writeI16(struct.max_indexes); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_index_names_argsTupleSchemeFactory implements SchemeFactory { public get_index_names_argsTupleScheme getScheme() { return new get_index_names_argsTupleScheme(); } } private static class get_index_names_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetMax_indexes()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetMax_indexes()) { oprot.writeI16(struct.max_indexes); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.max_indexes = iprot.readI16(); struct.setMax_indexesIsSet(true); } } } } public static class get_index_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_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 O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_index_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_index_names_resultTupleSchemeFactory()); } private List success; // required private MetaException o2; // 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"), O2((short)1, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); } public get_index_names_result() { } public get_index_names_result( List success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_index_names_result(get_index_names_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_index_names_result deepCopy() { return new get_index_names_result(this); } @Override public void clear() { this.success = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_names_result) return this.equals((get_index_names_result)that); return false; } public boolean equals(get_index_names_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_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_index_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_names_result typedOther = (get_index_names_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(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_names_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("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_index_names_resultStandardSchemeFactory implements SchemeFactory { public get_index_names_resultStandardScheme getScheme() { return new get_index_names_resultStandardScheme(); } } private static class get_index_names_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_index_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list902 = iprot.readListBegin(); struct.success = new ArrayList(_list902.size); for (int _i903 = 0; _i903 < _list902.size; ++_i903) { String _elem904; // optional _elem904 = iprot.readString(); struct.success.add(_elem904); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_index_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter905 : struct.success) { oprot.writeString(_iter905); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_index_names_resultTupleSchemeFactory implements SchemeFactory { public get_index_names_resultTupleScheme getScheme() { return new get_index_names_resultTupleScheme(); } } private static class get_index_names_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter906 : struct.success) { oprot.writeString(_iter906); } } } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_index_names_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list907 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list907.size); for (int _i908 = 0; _i908 < _list907.size; ++_i908) { String _elem909; // optional _elem909 = iprot.readString(); struct.success.add(_elem909); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class update_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_args"); private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_table_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_table_column_statistics_argsTupleSchemeFactory()); } private ColumnStatistics stats_obj; // 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 { STATS_OBJ((short)1, "stats_obj"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // STATS_OBJ return STATS_OBJ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_args.class, metaDataMap); } public update_table_column_statistics_args() { } public update_table_column_statistics_args( ColumnStatistics stats_obj) { this(); this.stats_obj = stats_obj; } /** * Performs a deep copy on other. */ public update_table_column_statistics_args(update_table_column_statistics_args other) { if (other.isSetStats_obj()) { this.stats_obj = new ColumnStatistics(other.stats_obj); } } public update_table_column_statistics_args deepCopy() { return new update_table_column_statistics_args(this); } @Override public void clear() { this.stats_obj = null; } public ColumnStatistics getStats_obj() { return this.stats_obj; } public void setStats_obj(ColumnStatistics stats_obj) { this.stats_obj = stats_obj; } public void unsetStats_obj() { this.stats_obj = null; } /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ public boolean isSetStats_obj() { return this.stats_obj != null; } public void setStats_objIsSet(boolean value) { if (!value) { this.stats_obj = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case STATS_OBJ: if (value == null) { unsetStats_obj(); } else { setStats_obj((ColumnStatistics)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case STATS_OBJ: return getStats_obj(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 STATS_OBJ: return isSetStats_obj(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof update_table_column_statistics_args) return this.equals((update_table_column_statistics_args)that); return false; } public boolean equals(update_table_column_statistics_args that) { if (that == null) return false; boolean this_present_stats_obj = true && this.isSetStats_obj(); boolean that_present_stats_obj = true && that.isSetStats_obj(); if (this_present_stats_obj || that_present_stats_obj) { if (!(this_present_stats_obj && that_present_stats_obj)) return false; if (!this.stats_obj.equals(that.stats_obj)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_stats_obj = true && (isSetStats_obj()); builder.append(present_stats_obj); if (present_stats_obj) builder.append(stats_obj); return builder.toHashCode(); } public int compareTo(update_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; update_table_column_statistics_args typedOther = (update_table_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(typedOther.isSetStats_obj()); if (lastComparison != 0) { return lastComparison; } if (isSetStats_obj()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, typedOther.stats_obj); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("update_table_column_statistics_args("); boolean first = true; sb.append("stats_obj:"); if (this.stats_obj == null) { sb.append("null"); } else { sb.append(this.stats_obj); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (stats_obj != null) { stats_obj.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public update_table_column_statistics_argsStandardScheme getScheme() { return new update_table_column_statistics_argsStandardScheme(); } } private static class update_table_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // STATS_OBJ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.stats_obj = new ColumnStatistics(); struct.stats_obj.read(iprot); struct.setStats_objIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.stats_obj != null) { oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); struct.stats_obj.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public update_table_column_statistics_argsTupleScheme getScheme() { return new update_table_column_statistics_argsTupleScheme(); } } private static class update_table_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetStats_obj()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetStats_obj()) { struct.stats_obj.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stats_obj = new ColumnStatistics(); struct.stats_obj.read(iprot); struct.setStats_objIsSet(true); } } } } public static class update_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_table_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_table_column_statistics_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(update_table_column_statistics_result.class, metaDataMap); } public update_table_column_statistics_result() { } public update_table_column_statistics_result( boolean success, NoSuchObjectException o1, InvalidObjectException o2, MetaException o3, InvalidInputException o4) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public update_table_column_statistics_result(update_table_column_statistics_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public update_table_column_statistics_result deepCopy() { return new update_table_column_statistics_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof update_table_column_statistics_result) return this.equals((update_table_column_statistics_result)that); return false; } public boolean equals(update_table_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(update_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; update_table_column_statistics_result typedOther = (update_table_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("update_table_column_statistics_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public update_table_column_statistics_resultStandardScheme getScheme() { return new update_table_column_statistics_resultStandardScheme(); } } private static class update_table_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public update_table_column_statistics_resultTupleScheme getScheme() { return new update_table_column_statistics_resultTupleScheme(); } } private static class update_table_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class update_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_args"); private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_partition_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_partition_column_statistics_argsTupleSchemeFactory()); } private ColumnStatistics stats_obj; // 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 { STATS_OBJ((short)1, "stats_obj"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // STATS_OBJ return STATS_OBJ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_args.class, metaDataMap); } public update_partition_column_statistics_args() { } public update_partition_column_statistics_args( ColumnStatistics stats_obj) { this(); this.stats_obj = stats_obj; } /** * Performs a deep copy on other. */ public update_partition_column_statistics_args(update_partition_column_statistics_args other) { if (other.isSetStats_obj()) { this.stats_obj = new ColumnStatistics(other.stats_obj); } } public update_partition_column_statistics_args deepCopy() { return new update_partition_column_statistics_args(this); } @Override public void clear() { this.stats_obj = null; } public ColumnStatistics getStats_obj() { return this.stats_obj; } public void setStats_obj(ColumnStatistics stats_obj) { this.stats_obj = stats_obj; } public void unsetStats_obj() { this.stats_obj = null; } /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ public boolean isSetStats_obj() { return this.stats_obj != null; } public void setStats_objIsSet(boolean value) { if (!value) { this.stats_obj = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case STATS_OBJ: if (value == null) { unsetStats_obj(); } else { setStats_obj((ColumnStatistics)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case STATS_OBJ: return getStats_obj(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 STATS_OBJ: return isSetStats_obj(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof update_partition_column_statistics_args) return this.equals((update_partition_column_statistics_args)that); return false; } public boolean equals(update_partition_column_statistics_args that) { if (that == null) return false; boolean this_present_stats_obj = true && this.isSetStats_obj(); boolean that_present_stats_obj = true && that.isSetStats_obj(); if (this_present_stats_obj || that_present_stats_obj) { if (!(this_present_stats_obj && that_present_stats_obj)) return false; if (!this.stats_obj.equals(that.stats_obj)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_stats_obj = true && (isSetStats_obj()); builder.append(present_stats_obj); if (present_stats_obj) builder.append(stats_obj); return builder.toHashCode(); } public int compareTo(update_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; update_partition_column_statistics_args typedOther = (update_partition_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(typedOther.isSetStats_obj()); if (lastComparison != 0) { return lastComparison; } if (isSetStats_obj()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, typedOther.stats_obj); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("update_partition_column_statistics_args("); boolean first = true; sb.append("stats_obj:"); if (this.stats_obj == null) { sb.append("null"); } else { sb.append(this.stats_obj); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (stats_obj != null) { stats_obj.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public update_partition_column_statistics_argsStandardScheme getScheme() { return new update_partition_column_statistics_argsStandardScheme(); } } private static class update_partition_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // STATS_OBJ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.stats_obj = new ColumnStatistics(); struct.stats_obj.read(iprot); struct.setStats_objIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.stats_obj != null) { oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); struct.stats_obj.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public update_partition_column_statistics_argsTupleScheme getScheme() { return new update_partition_column_statistics_argsTupleScheme(); } } private static class update_partition_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetStats_obj()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetStats_obj()) { struct.stats_obj.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stats_obj = new ColumnStatistics(); struct.stats_obj.read(iprot); struct.setStats_objIsSet(true); } } } } public static class update_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_partition_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_partition_column_statistics_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(update_partition_column_statistics_result.class, metaDataMap); } public update_partition_column_statistics_result() { } public update_partition_column_statistics_result( boolean success, NoSuchObjectException o1, InvalidObjectException o2, MetaException o3, InvalidInputException o4) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public update_partition_column_statistics_result(update_partition_column_statistics_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public update_partition_column_statistics_result deepCopy() { return new update_partition_column_statistics_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof update_partition_column_statistics_result) return this.equals((update_partition_column_statistics_result)that); return false; } public boolean equals(update_partition_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(update_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; update_partition_column_statistics_result typedOther = (update_partition_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("update_partition_column_statistics_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class update_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public update_partition_column_statistics_resultStandardScheme getScheme() { return new update_partition_column_statistics_resultStandardScheme(); } } private static class update_partition_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public update_partition_column_statistics_resultTupleScheme getScheme() { return new update_partition_column_statistics_resultTupleScheme(); } } private static class update_partition_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class get_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_column_statistics_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String col_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), COL_NAME((short)3, "col_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // COL_NAME return COL_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_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(get_table_column_statistics_args.class, metaDataMap); } public get_table_column_statistics_args() { } public get_table_column_statistics_args( String db_name, String tbl_name, String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.col_name = col_name; } /** * Performs a deep copy on other. */ public get_table_column_statistics_args(get_table_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetCol_name()) { this.col_name = other.col_name; } } public get_table_column_statistics_args deepCopy() { return new get_table_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.col_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getCol_name() { return this.col_name; } public void setCol_name(String col_name) { this.col_name = col_name; } public void unsetCol_name() { this.col_name = null; } /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ public boolean isSetCol_name() { return this.col_name != null; } public void setCol_nameIsSet(boolean value) { if (!value) { this.col_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case COL_NAME: if (value == null) { unsetCol_name(); } else { setCol_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case COL_NAME: return getCol_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case COL_NAME: return isSetCol_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_column_statistics_args) return this.equals((get_table_column_statistics_args)that); return false; } public boolean equals(get_table_column_statistics_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_col_name = true && this.isSetCol_name(); boolean that_present_col_name = true && that.isSetCol_name(); if (this_present_col_name || that_present_col_name) { if (!(this_present_col_name && that_present_col_name)) return false; if (!this.col_name.equals(that.col_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_col_name = true && (isSetCol_name()); builder.append(present_col_name); if (present_col_name) builder.append(col_name); return builder.toHashCode(); } public int compareTo(get_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_column_statistics_args typedOther = (get_table_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_column_statistics_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("col_name:"); if (this.col_name == null) { sb.append("null"); } else { sb.append(this.col_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public get_table_column_statistics_argsStandardScheme getScheme() { return new get_table_column_statistics_argsStandardScheme(); } } private static class get_table_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.col_name != null) { oprot.writeFieldBegin(COL_NAME_FIELD_DESC); oprot.writeString(struct.col_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public get_table_column_statistics_argsTupleScheme getScheme() { return new get_table_column_statistics_argsTupleScheme(); } } private static class get_table_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetCol_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetCol_name()) { oprot.writeString(struct.col_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } } } } public static class get_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_column_statistics_resultTupleSchemeFactory()); } private ColumnStatistics success; // required private NoSuchObjectException o1; // required private MetaException o2; // required private InvalidInputException o3; // required private InvalidObjectException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, ColumnStatistics.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_result.class, metaDataMap); } public get_table_column_statistics_result() { } public get_table_column_statistics_result( ColumnStatistics success, NoSuchObjectException o1, MetaException o2, InvalidInputException o3, InvalidObjectException o4) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public get_table_column_statistics_result(get_table_column_statistics_result other) { if (other.isSetSuccess()) { this.success = new ColumnStatistics(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } if (other.isSetO3()) { this.o3 = new InvalidInputException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidObjectException(other.o4); } } public get_table_column_statistics_result deepCopy() { return new get_table_column_statistics_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public ColumnStatistics getSuccess() { return this.success; } public void setSuccess(ColumnStatistics 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public InvalidInputException getO3() { return this.o3; } public void setO3(InvalidInputException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidObjectException getO4() { return this.o4; } public void setO4(InvalidObjectException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ColumnStatistics)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((InvalidInputException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_column_statistics_result) return this.equals((get_table_column_statistics_result)that); return false; } public boolean equals(get_table_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(get_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_column_statistics_result typedOther = (get_table_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_column_statistics_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public get_table_column_statistics_resultStandardScheme getScheme() { return new get_table_column_statistics_resultStandardScheme(); } } private static class get_table_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ColumnStatistics(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new InvalidInputException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public get_table_column_statistics_resultTupleScheme getScheme() { return new get_table_column_statistics_resultTupleScheme(); } } private static class get_table_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = new ColumnStatistics(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new InvalidInputException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class get_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_column_statistics_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_name; // required private String col_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"), COL_NAME((short)4, "col_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_NAME; case 4: // COL_NAME return COL_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_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(get_partition_column_statistics_args.class, metaDataMap); } public get_partition_column_statistics_args() { } public get_partition_column_statistics_args( String db_name, String tbl_name, String part_name, String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.col_name = col_name; } /** * Performs a deep copy on other. */ public get_partition_column_statistics_args(get_partition_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } if (other.isSetCol_name()) { this.col_name = other.col_name; } } public get_partition_column_statistics_args deepCopy() { return new get_partition_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; this.col_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public String getCol_name() { return this.col_name; } public void setCol_name(String col_name) { this.col_name = col_name; } public void unsetCol_name() { this.col_name = null; } /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ public boolean isSetCol_name() { return this.col_name != null; } public void setCol_nameIsSet(boolean value) { if (!value) { this.col_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case COL_NAME: if (value == null) { unsetCol_name(); } else { setCol_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case COL_NAME: return getCol_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case COL_NAME: return isSetCol_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_column_statistics_args) return this.equals((get_partition_column_statistics_args)that); return false; } public boolean equals(get_partition_column_statistics_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_col_name = true && this.isSetCol_name(); boolean that_present_col_name = true && that.isSetCol_name(); if (this_present_col_name || that_present_col_name) { if (!(this_present_col_name && that_present_col_name)) return false; if (!this.col_name.equals(that.col_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); boolean present_col_name = true && (isSetCol_name()); builder.append(present_col_name); if (present_col_name) builder.append(col_name); return builder.toHashCode(); } public int compareTo(get_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_column_statistics_args typedOther = (get_partition_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_column_statistics_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; if (!first) sb.append(", "); sb.append("col_name:"); if (this.col_name == null) { sb.append("null"); } else { sb.append(this.col_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public get_partition_column_statistics_argsStandardScheme getScheme() { return new get_partition_column_statistics_argsStandardScheme(); } } private static class get_partition_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } if (struct.col_name != null) { oprot.writeFieldBegin(COL_NAME_FIELD_DESC); oprot.writeString(struct.col_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public get_partition_column_statistics_argsTupleScheme getScheme() { return new get_partition_column_statistics_argsTupleScheme(); } } private static class get_partition_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } if (struct.isSetCol_name()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } if (struct.isSetCol_name()) { oprot.writeString(struct.col_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } if (incoming.get(3)) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } } } } public static class get_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_column_statistics_resultTupleSchemeFactory()); } private ColumnStatistics success; // required private NoSuchObjectException o1; // required private MetaException o2; // required private InvalidInputException o3; // required private InvalidObjectException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, ColumnStatistics.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_result.class, metaDataMap); } public get_partition_column_statistics_result() { } public get_partition_column_statistics_result( ColumnStatistics success, NoSuchObjectException o1, MetaException o2, InvalidInputException o3, InvalidObjectException o4) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public get_partition_column_statistics_result(get_partition_column_statistics_result other) { if (other.isSetSuccess()) { this.success = new ColumnStatistics(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } if (other.isSetO3()) { this.o3 = new InvalidInputException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidObjectException(other.o4); } } public get_partition_column_statistics_result deepCopy() { return new get_partition_column_statistics_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public ColumnStatistics getSuccess() { return this.success; } public void setSuccess(ColumnStatistics 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public InvalidInputException getO3() { return this.o3; } public void setO3(InvalidInputException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidObjectException getO4() { return this.o4; } public void setO4(InvalidObjectException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ColumnStatistics)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((InvalidInputException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_column_statistics_result) return this.equals((get_partition_column_statistics_result)that); return false; } public boolean equals(get_partition_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(get_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_column_statistics_result typedOther = (get_partition_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partition_column_statistics_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public get_partition_column_statistics_resultStandardScheme getScheme() { return new get_partition_column_statistics_resultStandardScheme(); } } private static class get_partition_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ColumnStatistics(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new InvalidInputException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public get_partition_column_statistics_resultTupleScheme getScheme() { return new get_partition_column_statistics_resultTupleScheme(); } } private static class get_partition_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = new ColumnStatistics(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new InvalidInputException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class get_table_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_statistics_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_statistics_req_argsTupleSchemeFactory()); } private TableStatsRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableStatsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_args.class, metaDataMap); } public get_table_statistics_req_args() { } public get_table_statistics_req_args( TableStatsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public get_table_statistics_req_args(get_table_statistics_req_args other) { if (other.isSetRequest()) { this.request = new TableStatsRequest(other.request); } } public get_table_statistics_req_args deepCopy() { return new get_table_statistics_req_args(this); } @Override public void clear() { this.request = null; } public TableStatsRequest getRequest() { return this.request; } public void setRequest(TableStatsRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((TableStatsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_statistics_req_args) return this.equals((get_table_statistics_req_args)that); return false; } public boolean equals(get_table_statistics_req_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(get_table_statistics_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_statistics_req_args typedOther = (get_table_statistics_req_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_statistics_req_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_statistics_req_argsStandardSchemeFactory implements SchemeFactory { public get_table_statistics_req_argsStandardScheme getScheme() { return new get_table_statistics_req_argsStandardScheme(); } } private static class get_table_statistics_req_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new TableStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_statistics_req_argsTupleSchemeFactory implements SchemeFactory { public get_table_statistics_req_argsTupleScheme getScheme() { return new get_table_statistics_req_argsTupleScheme(); } } private static class get_table_statistics_req_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new TableStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_table_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_statistics_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_statistics_req_resultTupleSchemeFactory()); } private TableStatsResult success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, TableStatsResult.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_result.class, metaDataMap); } public get_table_statistics_req_result() { } public get_table_statistics_req_result( TableStatsResult success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_table_statistics_req_result(get_table_statistics_req_result other) { if (other.isSetSuccess()) { this.success = new TableStatsResult(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_table_statistics_req_result deepCopy() { return new get_table_statistics_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public TableStatsResult getSuccess() { return this.success; } public void setSuccess(TableStatsResult 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TableStatsResult)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_statistics_req_result) return this.equals((get_table_statistics_req_result)that); return false; } public boolean equals(get_table_statistics_req_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_table_statistics_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_statistics_req_result typedOther = (get_table_statistics_req_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_statistics_req_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_table_statistics_req_resultStandardSchemeFactory implements SchemeFactory { public get_table_statistics_req_resultStandardScheme getScheme() { return new get_table_statistics_req_resultStandardScheme(); } } private static class get_table_statistics_req_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TableStatsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_table_statistics_req_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_statistics_req_resultTupleSchemeFactory implements SchemeFactory { public get_table_statistics_req_resultTupleScheme getScheme() { return new get_table_statistics_req_resultTupleScheme(); } } private static class get_table_statistics_req_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new TableStatsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_partitions_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_statistics_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_statistics_req_argsTupleSchemeFactory()); } private PartitionsStatsRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_args.class, metaDataMap); } public get_partitions_statistics_req_args() { } public get_partitions_statistics_req_args( PartitionsStatsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public get_partitions_statistics_req_args(get_partitions_statistics_req_args other) { if (other.isSetRequest()) { this.request = new PartitionsStatsRequest(other.request); } } public get_partitions_statistics_req_args deepCopy() { return new get_partitions_statistics_req_args(this); } @Override public void clear() { this.request = null; } public PartitionsStatsRequest getRequest() { return this.request; } public void setRequest(PartitionsStatsRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((PartitionsStatsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_statistics_req_args) return this.equals((get_partitions_statistics_req_args)that); return false; } public boolean equals(get_partitions_statistics_req_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(get_partitions_statistics_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_statistics_req_args typedOther = (get_partitions_statistics_req_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_statistics_req_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_statistics_req_argsStandardSchemeFactory implements SchemeFactory { public get_partitions_statistics_req_argsStandardScheme getScheme() { return new get_partitions_statistics_req_argsStandardScheme(); } } private static class get_partitions_statistics_req_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new PartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_statistics_req_argsTupleSchemeFactory implements SchemeFactory { public get_partitions_statistics_req_argsTupleScheme getScheme() { return new get_partitions_statistics_req_argsTupleScheme(); } } private static class get_partitions_statistics_req_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new PartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_partitions_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_statistics_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_statistics_req_resultTupleSchemeFactory()); } private PartitionsStatsResult success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, PartitionsStatsResult.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_result.class, metaDataMap); } public get_partitions_statistics_req_result() { } public get_partitions_statistics_req_result( PartitionsStatsResult success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_partitions_statistics_req_result(get_partitions_statistics_req_result other) { if (other.isSetSuccess()) { this.success = new PartitionsStatsResult(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partitions_statistics_req_result deepCopy() { return new get_partitions_statistics_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public PartitionsStatsResult getSuccess() { return this.success; } public void setSuccess(PartitionsStatsResult 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((PartitionsStatsResult)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_statistics_req_result) return this.equals((get_partitions_statistics_req_result)that); return false; } public boolean equals(get_partitions_statistics_req_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_partitions_statistics_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_statistics_req_result typedOther = (get_partitions_statistics_req_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_partitions_statistics_req_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_partitions_statistics_req_resultStandardSchemeFactory implements SchemeFactory { public get_partitions_statistics_req_resultStandardScheme getScheme() { return new get_partitions_statistics_req_resultStandardScheme(); } } private static class get_partitions_statistics_req_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new PartitionsStatsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_partitions_statistics_req_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_partitions_statistics_req_resultTupleSchemeFactory implements SchemeFactory { public get_partitions_statistics_req_resultTupleScheme getScheme() { return new get_partitions_statistics_req_resultTupleScheme(); } } private static class get_partitions_statistics_req_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new PartitionsStatsResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_aggr_stats_for_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_aggr_stats_for_argsTupleSchemeFactory()); } private PartitionsStatsRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_args.class, metaDataMap); } public get_aggr_stats_for_args() { } public get_aggr_stats_for_args( PartitionsStatsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public get_aggr_stats_for_args(get_aggr_stats_for_args other) { if (other.isSetRequest()) { this.request = new PartitionsStatsRequest(other.request); } } public get_aggr_stats_for_args deepCopy() { return new get_aggr_stats_for_args(this); } @Override public void clear() { this.request = null; } public PartitionsStatsRequest getRequest() { return this.request; } public void setRequest(PartitionsStatsRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((PartitionsStatsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_aggr_stats_for_args) return this.equals((get_aggr_stats_for_args)that); return false; } public boolean equals(get_aggr_stats_for_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(get_aggr_stats_for_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_aggr_stats_for_args typedOther = (get_aggr_stats_for_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_aggr_stats_for_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { public get_aggr_stats_for_argsStandardScheme getScheme() { return new get_aggr_stats_for_argsStandardScheme(); } } private static class get_aggr_stats_for_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new PartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { public get_aggr_stats_for_argsTupleScheme getScheme() { return new get_aggr_stats_for_argsTupleScheme(); } } private static class get_aggr_stats_for_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new PartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_aggr_stats_for_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_aggr_stats_for_resultTupleSchemeFactory()); } private AggrStats success; // required private NoSuchObjectException o1; // required private MetaException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, AggrStats.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_result.class, metaDataMap); } public get_aggr_stats_for_result() { } public get_aggr_stats_for_result( AggrStats success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_aggr_stats_for_result(get_aggr_stats_for_result other) { if (other.isSetSuccess()) { this.success = new AggrStats(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_aggr_stats_for_result deepCopy() { return new get_aggr_stats_for_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public AggrStats getSuccess() { return this.success; } public void setSuccess(AggrStats 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 NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((AggrStats)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_aggr_stats_for_result) return this.equals((get_aggr_stats_for_result)that); return false; } public boolean equals(get_aggr_stats_for_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_aggr_stats_for_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_aggr_stats_for_result typedOther = (get_aggr_stats_for_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_aggr_stats_for_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { public get_aggr_stats_for_resultStandardScheme getScheme() { return new get_aggr_stats_for_resultStandardScheme(); } } private static class get_aggr_stats_for_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new AggrStats(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_aggr_stats_for_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { public get_aggr_stats_for_resultTupleScheme getScheme() { return new get_aggr_stats_for_resultTupleScheme(); } } private static class get_aggr_stats_for_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new AggrStats(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class set_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_aggr_stats_for_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_aggr_stats_for_argsTupleSchemeFactory()); } private SetPartitionsStatsRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetPartitionsStatsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_aggr_stats_for_args.class, metaDataMap); } public set_aggr_stats_for_args() { } public set_aggr_stats_for_args( SetPartitionsStatsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public set_aggr_stats_for_args(set_aggr_stats_for_args other) { if (other.isSetRequest()) { this.request = new SetPartitionsStatsRequest(other.request); } } public set_aggr_stats_for_args deepCopy() { return new set_aggr_stats_for_args(this); } @Override public void clear() { this.request = null; } public SetPartitionsStatsRequest getRequest() { return this.request; } public void setRequest(SetPartitionsStatsRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((SetPartitionsStatsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof set_aggr_stats_for_args) return this.equals((set_aggr_stats_for_args)that); return false; } public boolean equals(set_aggr_stats_for_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(set_aggr_stats_for_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_aggr_stats_for_args typedOther = (set_aggr_stats_for_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_aggr_stats_for_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { public set_aggr_stats_for_argsStandardScheme getScheme() { return new set_aggr_stats_for_argsStandardScheme(); } } private static class set_aggr_stats_for_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new SetPartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { public set_aggr_stats_for_argsTupleScheme getScheme() { return new set_aggr_stats_for_argsTupleScheme(); } } private static class set_aggr_stats_for_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new SetPartitionsStatsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class set_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_aggr_stats_for_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_aggr_stats_for_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(set_aggr_stats_for_result.class, metaDataMap); } public set_aggr_stats_for_result() { } public set_aggr_stats_for_result( boolean success, NoSuchObjectException o1, InvalidObjectException o2, MetaException o3, InvalidInputException o4) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public set_aggr_stats_for_result(set_aggr_stats_for_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public set_aggr_stats_for_result deepCopy() { return new set_aggr_stats_for_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof set_aggr_stats_for_result) return this.equals((set_aggr_stats_for_result)that); return false; } public boolean equals(set_aggr_stats_for_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(set_aggr_stats_for_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_aggr_stats_for_result typedOther = (set_aggr_stats_for_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_aggr_stats_for_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { public set_aggr_stats_for_resultStandardScheme getScheme() { return new set_aggr_stats_for_resultStandardScheme(); } } private static class set_aggr_stats_for_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { public set_aggr_stats_for_resultTupleScheme getScheme() { return new set_aggr_stats_for_resultTupleScheme(); } } private static class set_aggr_stats_for_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class delete_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_partition_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_partition_column_statistics_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String part_name; // required private String col_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), PART_NAME((short)3, "part_name"), COL_NAME((short)4, "col_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // PART_NAME return PART_NAME; case 4: // COL_NAME return COL_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_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(delete_partition_column_statistics_args.class, metaDataMap); } public delete_partition_column_statistics_args() { } public delete_partition_column_statistics_args( String db_name, String tbl_name, String part_name, String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_name = part_name; this.col_name = col_name; } /** * Performs a deep copy on other. */ public delete_partition_column_statistics_args(delete_partition_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } if (other.isSetCol_name()) { this.col_name = other.col_name; } } public delete_partition_column_statistics_args deepCopy() { return new delete_partition_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_name = null; this.col_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getPart_name() { return this.part_name; } public void setPart_name(String part_name) { this.part_name = part_name; } public void unsetPart_name() { this.part_name = null; } /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } public void setPart_nameIsSet(boolean value) { if (!value) { this.part_name = null; } } public String getCol_name() { return this.col_name; } public void setCol_name(String col_name) { this.col_name = col_name; } public void unsetCol_name() { this.col_name = null; } /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ public boolean isSetCol_name() { return this.col_name != null; } public void setCol_nameIsSet(boolean value) { if (!value) { this.col_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case COL_NAME: if (value == null) { unsetCol_name(); } else { setCol_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case COL_NAME: return getCol_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case COL_NAME: return isSetCol_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_partition_column_statistics_args) return this.equals((delete_partition_column_statistics_args)that); return false; } public boolean equals(delete_partition_column_statistics_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_col_name = true && this.isSetCol_name(); boolean that_present_col_name = true && that.isSetCol_name(); if (this_present_col_name || that_present_col_name) { if (!(this_present_col_name && that_present_col_name)) return false; if (!this.col_name.equals(that.col_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_part_name = true && (isSetPart_name()); builder.append(present_part_name); if (present_part_name) builder.append(part_name); boolean present_col_name = true && (isSetCol_name()); builder.append(present_col_name); if (present_col_name) builder.append(col_name); return builder.toHashCode(); } public int compareTo(delete_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_partition_column_statistics_args typedOther = (delete_partition_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_partition_column_statistics_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("part_name:"); if (this.part_name == null) { sb.append("null"); } else { sb.append(this.part_name); } first = false; if (!first) sb.append(", "); sb.append("col_name:"); if (this.col_name == null) { sb.append("null"); } else { sb.append(this.col_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public delete_partition_column_statistics_argsStandardScheme getScheme() { return new delete_partition_column_statistics_argsStandardScheme(); } } private static class delete_partition_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // COL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(struct.part_name); oprot.writeFieldEnd(); } if (struct.col_name != null) { oprot.writeFieldBegin(COL_NAME_FIELD_DESC); oprot.writeString(struct.col_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public delete_partition_column_statistics_argsTupleScheme getScheme() { return new delete_partition_column_statistics_argsTupleScheme(); } } private static class delete_partition_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetPart_name()) { optionals.set(2); } if (struct.isSetCol_name()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetPart_name()) { oprot.writeString(struct.part_name); } if (struct.isSetCol_name()) { oprot.writeString(struct.col_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.part_name = iprot.readString(); struct.setPart_nameIsSet(true); } if (incoming.get(3)) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } } } } public static class delete_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_partition_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_partition_column_statistics_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required private InvalidObjectException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(delete_partition_column_statistics_result.class, metaDataMap); } public delete_partition_column_statistics_result() { } public delete_partition_column_statistics_result( boolean success, NoSuchObjectException o1, MetaException o2, InvalidObjectException o3, InvalidInputException o4) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public delete_partition_column_statistics_result(delete_partition_column_statistics_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } if (other.isSetO3()) { this.o3 = new InvalidObjectException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public delete_partition_column_statistics_result deepCopy() { return new delete_partition_column_statistics_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public InvalidObjectException getO3() { return this.o3; } public void setO3(InvalidObjectException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((InvalidObjectException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_partition_column_statistics_result) return this.equals((delete_partition_column_statistics_result)that); return false; } public boolean equals(delete_partition_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(delete_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_partition_column_statistics_result typedOther = (delete_partition_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_partition_column_statistics_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public delete_partition_column_statistics_resultStandardScheme getScheme() { return new delete_partition_column_statistics_resultStandardScheme(); } } private static class delete_partition_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public delete_partition_column_statistics_resultTupleScheme getScheme() { return new delete_partition_column_statistics_resultTupleScheme(); } } private static class delete_partition_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class delete_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_table_column_statistics_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_table_column_statistics_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String col_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), COL_NAME((short)3, "col_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // COL_NAME return COL_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_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(delete_table_column_statistics_args.class, metaDataMap); } public delete_table_column_statistics_args() { } public delete_table_column_statistics_args( String db_name, String tbl_name, String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.col_name = col_name; } /** * Performs a deep copy on other. */ public delete_table_column_statistics_args(delete_table_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } if (other.isSetCol_name()) { this.col_name = other.col_name; } } public delete_table_column_statistics_args deepCopy() { return new delete_table_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.col_name = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public String getCol_name() { return this.col_name; } public void setCol_name(String col_name) { this.col_name = col_name; } public void unsetCol_name() { this.col_name = null; } /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ public boolean isSetCol_name() { return this.col_name != null; } public void setCol_nameIsSet(boolean value) { if (!value) { this.col_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case COL_NAME: if (value == null) { unsetCol_name(); } else { setCol_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case COL_NAME: return getCol_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case COL_NAME: return isSetCol_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_table_column_statistics_args) return this.equals((delete_table_column_statistics_args)that); return false; } public boolean equals(delete_table_column_statistics_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_col_name = true && this.isSetCol_name(); boolean that_present_col_name = true && that.isSetCol_name(); if (this_present_col_name || that_present_col_name) { if (!(this_present_col_name && that_present_col_name)) return false; if (!this.col_name.equals(that.col_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_db_name = true && (isSetDb_name()); builder.append(present_db_name); if (present_db_name) builder.append(db_name); boolean present_tbl_name = true && (isSetTbl_name()); builder.append(present_tbl_name); if (present_tbl_name) builder.append(tbl_name); boolean present_col_name = true && (isSetCol_name()); builder.append(present_col_name); if (present_col_name) builder.append(col_name); return builder.toHashCode(); } public int compareTo(delete_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_table_column_statistics_args typedOther = (delete_table_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_table_column_statistics_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { sb.append(this.db_name); } first = false; if (!first) sb.append(", "); sb.append("tbl_name:"); if (this.tbl_name == null) { sb.append("null"); } else { sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); sb.append("col_name:"); if (this.col_name == null) { sb.append("null"); } else { sb.append(this.col_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { public delete_table_column_statistics_argsStandardScheme getScheme() { return new delete_table_column_statistics_argsStandardScheme(); } } private static class delete_table_column_statistics_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.db_name); oprot.writeFieldEnd(); } if (struct.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(struct.tbl_name); oprot.writeFieldEnd(); } if (struct.col_name != null) { oprot.writeFieldBegin(COL_NAME_FIELD_DESC); oprot.writeString(struct.col_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { public delete_table_column_statistics_argsTupleScheme getScheme() { return new delete_table_column_statistics_argsTupleScheme(); } } private static class delete_table_column_statistics_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_name()) { optionals.set(0); } if (struct.isSetTbl_name()) { optionals.set(1); } if (struct.isSetCol_name()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetTbl_name()) { oprot.writeString(struct.tbl_name); } if (struct.isSetCol_name()) { oprot.writeString(struct.col_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_name = iprot.readString(); struct.setDb_nameIsSet(true); } if (incoming.get(1)) { struct.tbl_name = iprot.readString(); struct.setTbl_nameIsSet(true); } if (incoming.get(2)) { struct.col_name = iprot.readString(); struct.setCol_nameIsSet(true); } } } } public static class delete_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_table_column_statistics_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_table_column_statistics_resultTupleSchemeFactory()); } private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required private InvalidObjectException o3; // required private InvalidInputException o4; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(delete_table_column_statistics_result.class, metaDataMap); } public delete_table_column_statistics_result() { } public delete_table_column_statistics_result( boolean success, NoSuchObjectException o1, MetaException o2, InvalidObjectException o3, InvalidInputException o4) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public delete_table_column_statistics_result(delete_table_column_statistics_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } if (other.isSetO3()) { this.o3 = new InvalidObjectException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public delete_table_column_statistics_result deepCopy() { return new delete_table_column_statistics_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public InvalidObjectException getO3() { return this.o3; } public void setO3(InvalidObjectException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public InvalidInputException getO4() { return this.o4; } public void setO4(InvalidInputException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((InvalidObjectException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((InvalidInputException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_table_column_statistics_result) return this.equals((delete_table_column_statistics_result)that); return false; } public boolean equals(delete_table_column_statistics_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(delete_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_table_column_statistics_result typedOther = (delete_table_column_statistics_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_table_column_statistics_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { public delete_table_column_statistics_resultStandardScheme getScheme() { return new delete_table_column_statistics_resultStandardScheme(); } } private static class delete_table_column_statistics_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { public delete_table_column_statistics_resultTupleScheme getScheme() { return new delete_table_column_statistics_resultTupleScheme(); } } private static class delete_table_column_statistics_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new InvalidObjectException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(4)) { struct.o4 = new InvalidInputException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class create_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_args"); private static final org.apache.thrift.protocol.TField FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("func", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_function_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_function_argsTupleSchemeFactory()); } private Function func; // 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 { FUNC((short)1, "func"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // FUNC return FUNC; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.FUNC, new org.apache.thrift.meta_data.FieldMetaData("func", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_args.class, metaDataMap); } public create_function_args() { } public create_function_args( Function func) { this(); this.func = func; } /** * Performs a deep copy on other. */ public create_function_args(create_function_args other) { if (other.isSetFunc()) { this.func = new Function(other.func); } } public create_function_args deepCopy() { return new create_function_args(this); } @Override public void clear() { this.func = null; } public Function getFunc() { return this.func; } public void setFunc(Function func) { this.func = func; } public void unsetFunc() { this.func = null; } /** Returns true if field func is set (has been assigned a value) and false otherwise */ public boolean isSetFunc() { return this.func != null; } public void setFuncIsSet(boolean value) { if (!value) { this.func = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case FUNC: if (value == null) { unsetFunc(); } else { setFunc((Function)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case FUNC: return getFunc(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 FUNC: return isSetFunc(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_function_args) return this.equals((create_function_args)that); return false; } public boolean equals(create_function_args that) { if (that == null) return false; boolean this_present_func = true && this.isSetFunc(); boolean that_present_func = true && that.isSetFunc(); if (this_present_func || that_present_func) { if (!(this_present_func && that_present_func)) return false; if (!this.func.equals(that.func)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_func = true && (isSetFunc()); builder.append(present_func); if (present_func) builder.append(func); return builder.toHashCode(); } public int compareTo(create_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_function_args typedOther = (create_function_args)other; lastComparison = Boolean.valueOf(isSetFunc()).compareTo(typedOther.isSetFunc()); if (lastComparison != 0) { return lastComparison; } if (isSetFunc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.func, typedOther.func); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_function_args("); boolean first = true; sb.append("func:"); if (this.func == null) { sb.append("null"); } else { sb.append(this.func); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (func != null) { func.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_function_argsStandardSchemeFactory implements SchemeFactory { public create_function_argsStandardScheme getScheme() { return new create_function_argsStandardScheme(); } } private static class create_function_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // FUNC if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.func = new Function(); struct.func.read(iprot); struct.setFuncIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_function_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.func != null) { oprot.writeFieldBegin(FUNC_FIELD_DESC); struct.func.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_function_argsTupleSchemeFactory implements SchemeFactory { public create_function_argsTupleScheme getScheme() { return new create_function_argsTupleScheme(); } } private static class create_function_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetFunc()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetFunc()) { struct.func.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.func = new Function(); struct.func.read(iprot); struct.setFuncIsSet(true); } } } } public static class create_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_function_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_function_resultTupleSchemeFactory()); } private AlreadyExistsException o1; // required private InvalidObjectException o2; // required private MetaException o3; // required private NoSuchObjectException o4; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"), O4((short)4, "o4"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; case 4: // O4 return O4; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", 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(create_function_result.class, metaDataMap); } public create_function_result() { } public create_function_result( AlreadyExistsException o1, InvalidObjectException o2, MetaException o3, NoSuchObjectException o4) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; this.o4 = o4; } /** * Performs a deep copy on other. */ public create_function_result(create_function_result other) { if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidObjectException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } if (other.isSetO4()) { this.o4 = new NoSuchObjectException(other.o4); } } public create_function_result deepCopy() { return new create_function_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public NoSuchObjectException getO4() { return this.o4; } public void setO4(NoSuchObjectException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_function_result) return this.equals((create_function_result)that); return false; } public boolean equals(create_function_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); boolean present_o4 = true && (isSetO4()); builder.append(present_o4); if (present_o4) builder.append(o4); return builder.toHashCode(); } public int compareTo(create_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_function_result typedOther = (create_function_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_function_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; if (!first) sb.append(", "); sb.append("o4:"); if (this.o4 == null) { sb.append("null"); } else { sb.append(this.o4); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_function_resultStandardSchemeFactory implements SchemeFactory { public create_function_resultStandardScheme getScheme() { return new create_function_resultStandardScheme(); } } private static class create_function_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // O4 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_function_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_function_resultTupleSchemeFactory implements SchemeFactory { public create_function_resultTupleScheme getScheme() { return new create_function_resultTupleScheme(); } } private static class create_function_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_function_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } if (struct.isSetO4()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } if (struct.isSetO4()) { struct.o4.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_function_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.o1 = new AlreadyExistsException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new InvalidObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } if (incoming.get(3)) { struct.o4 = new NoSuchObjectException(); struct.o4.read(iprot); struct.setO4IsSet(true); } } } } public static class drop_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_function_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_function_argsTupleSchemeFactory()); } private String dbName; // required private String funcName; // 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 { DB_NAME((short)1, "dbName"), FUNC_NAME((short)2, "funcName"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // FUNC_NAME return FUNC_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", 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(drop_function_args.class, metaDataMap); } public drop_function_args() { } public drop_function_args( String dbName, String funcName) { this(); this.dbName = dbName; this.funcName = funcName; } /** * Performs a deep copy on other. */ public drop_function_args(drop_function_args other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetFuncName()) { this.funcName = other.funcName; } } public drop_function_args deepCopy() { return new drop_function_args(this); } @Override public void clear() { this.dbName = null; this.funcName = null; } public String getDbName() { return this.dbName; } public void setDbName(String dbName) { this.dbName = dbName; } public void unsetDbName() { this.dbName = null; } /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } public void setDbNameIsSet(boolean value) { if (!value) { this.dbName = null; } } public String getFuncName() { return this.funcName; } public void setFuncName(String funcName) { this.funcName = funcName; } public void unsetFuncName() { this.funcName = null; } /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ public boolean isSetFuncName() { return this.funcName != null; } public void setFuncNameIsSet(boolean value) { if (!value) { this.funcName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDbName(); } else { setDbName((String)value); } break; case FUNC_NAME: if (value == null) { unsetFuncName(); } else { setFuncName((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDbName(); case FUNC_NAME: return getFuncName(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDbName(); case FUNC_NAME: return isSetFuncName(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_function_args) return this.equals((drop_function_args)that); return false; } public boolean equals(drop_function_args that) { if (that == null) return false; boolean this_present_dbName = true && this.isSetDbName(); boolean that_present_dbName = true && that.isSetDbName(); if (this_present_dbName || that_present_dbName) { if (!(this_present_dbName && that_present_dbName)) return false; if (!this.dbName.equals(that.dbName)) return false; } boolean this_present_funcName = true && this.isSetFuncName(); boolean that_present_funcName = true && that.isSetFuncName(); if (this_present_funcName || that_present_funcName) { if (!(this_present_funcName && that_present_funcName)) return false; if (!this.funcName.equals(that.funcName)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbName = true && (isSetDbName()); builder.append(present_dbName); if (present_dbName) builder.append(dbName); boolean present_funcName = true && (isSetFuncName()); builder.append(present_funcName); if (present_funcName) builder.append(funcName); return builder.toHashCode(); } public int compareTo(drop_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_function_args typedOther = (drop_function_args)other; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_function_args("); boolean first = true; sb.append("dbName:"); if (this.dbName == null) { sb.append("null"); } else { sb.append(this.dbName); } first = false; if (!first) sb.append(", "); sb.append("funcName:"); if (this.funcName == null) { sb.append("null"); } else { sb.append(this.funcName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_function_argsStandardSchemeFactory implements SchemeFactory { public drop_function_argsStandardScheme getScheme() { return new drop_function_argsStandardScheme(); } } private static class drop_function_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FUNC_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_function_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbName != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.dbName); oprot.writeFieldEnd(); } if (struct.funcName != null) { oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); oprot.writeString(struct.funcName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_function_argsTupleSchemeFactory implements SchemeFactory { public drop_function_argsTupleScheme getScheme() { return new drop_function_argsTupleScheme(); } } private static class drop_function_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbName()) { optionals.set(0); } if (struct.isSetFuncName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbName()) { oprot.writeString(struct.dbName); } if (struct.isSetFuncName()) { oprot.writeString(struct.funcName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_function_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } if (incoming.get(1)) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } } } } public static class drop_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_function_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_function_resultTupleSchemeFactory()); } private NoSuchObjectException o1; // required private MetaException o3; // 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 { O1((short)1, "o1"), O3((short)2, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(drop_function_result.class, metaDataMap); } public drop_function_result() { } public drop_function_result( NoSuchObjectException o1, MetaException o3) { this(); this.o1 = o1; this.o3 = o3; } /** * Performs a deep copy on other. */ public drop_function_result(drop_function_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public drop_function_result deepCopy() { return new drop_function_result(this); } @Override public void clear() { this.o1 = null; this.o3 = null; } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_function_result) return this.equals((drop_function_result)that); return false; } public boolean equals(drop_function_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(drop_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_function_result typedOther = (drop_function_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_function_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_function_resultStandardSchemeFactory implements SchemeFactory { public drop_function_resultStandardScheme getScheme() { return new drop_function_resultStandardScheme(); } } private static class drop_function_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_function_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_function_resultTupleSchemeFactory implements SchemeFactory { public drop_function_resultTupleScheme getScheme() { return new drop_function_resultTupleScheme(); } } private static class drop_function_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO3()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_function_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchObjectException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o3 = new MetaException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class alter_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("newFunc", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_function_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_function_argsTupleSchemeFactory()); } private String dbName; // required private String funcName; // required private Function newFunc; // 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 { DB_NAME((short)1, "dbName"), FUNC_NAME((short)2, "funcName"), NEW_FUNC((short)3, "newFunc"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // FUNC_NAME return FUNC_NAME; case 3: // NEW_FUNC return NEW_FUNC; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NEW_FUNC, new org.apache.thrift.meta_data.FieldMetaData("newFunc", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_args.class, metaDataMap); } public alter_function_args() { } public alter_function_args( String dbName, String funcName, Function newFunc) { this(); this.dbName = dbName; this.funcName = funcName; this.newFunc = newFunc; } /** * Performs a deep copy on other. */ public alter_function_args(alter_function_args other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetFuncName()) { this.funcName = other.funcName; } if (other.isSetNewFunc()) { this.newFunc = new Function(other.newFunc); } } public alter_function_args deepCopy() { return new alter_function_args(this); } @Override public void clear() { this.dbName = null; this.funcName = null; this.newFunc = null; } public String getDbName() { return this.dbName; } public void setDbName(String dbName) { this.dbName = dbName; } public void unsetDbName() { this.dbName = null; } /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } public void setDbNameIsSet(boolean value) { if (!value) { this.dbName = null; } } public String getFuncName() { return this.funcName; } public void setFuncName(String funcName) { this.funcName = funcName; } public void unsetFuncName() { this.funcName = null; } /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ public boolean isSetFuncName() { return this.funcName != null; } public void setFuncNameIsSet(boolean value) { if (!value) { this.funcName = null; } } public Function getNewFunc() { return this.newFunc; } public void setNewFunc(Function newFunc) { this.newFunc = newFunc; } public void unsetNewFunc() { this.newFunc = null; } /** Returns true if field newFunc is set (has been assigned a value) and false otherwise */ public boolean isSetNewFunc() { return this.newFunc != null; } public void setNewFuncIsSet(boolean value) { if (!value) { this.newFunc = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDbName(); } else { setDbName((String)value); } break; case FUNC_NAME: if (value == null) { unsetFuncName(); } else { setFuncName((String)value); } break; case NEW_FUNC: if (value == null) { unsetNewFunc(); } else { setNewFunc((Function)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDbName(); case FUNC_NAME: return getFuncName(); case NEW_FUNC: return getNewFunc(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDbName(); case FUNC_NAME: return isSetFuncName(); case NEW_FUNC: return isSetNewFunc(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_function_args) return this.equals((alter_function_args)that); return false; } public boolean equals(alter_function_args that) { if (that == null) return false; boolean this_present_dbName = true && this.isSetDbName(); boolean that_present_dbName = true && that.isSetDbName(); if (this_present_dbName || that_present_dbName) { if (!(this_present_dbName && that_present_dbName)) return false; if (!this.dbName.equals(that.dbName)) return false; } boolean this_present_funcName = true && this.isSetFuncName(); boolean that_present_funcName = true && that.isSetFuncName(); if (this_present_funcName || that_present_funcName) { if (!(this_present_funcName && that_present_funcName)) return false; if (!this.funcName.equals(that.funcName)) return false; } boolean this_present_newFunc = true && this.isSetNewFunc(); boolean that_present_newFunc = true && that.isSetNewFunc(); if (this_present_newFunc || that_present_newFunc) { if (!(this_present_newFunc && that_present_newFunc)) return false; if (!this.newFunc.equals(that.newFunc)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbName = true && (isSetDbName()); builder.append(present_dbName); if (present_dbName) builder.append(dbName); boolean present_funcName = true && (isSetFuncName()); builder.append(present_funcName); if (present_funcName) builder.append(funcName); boolean present_newFunc = true && (isSetNewFunc()); builder.append(present_newFunc); if (present_newFunc) builder.append(newFunc); return builder.toHashCode(); } public int compareTo(alter_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_function_args typedOther = (alter_function_args)other; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNewFunc()).compareTo(typedOther.isSetNewFunc()); if (lastComparison != 0) { return lastComparison; } if (isSetNewFunc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFunc, typedOther.newFunc); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_function_args("); boolean first = true; sb.append("dbName:"); if (this.dbName == null) { sb.append("null"); } else { sb.append(this.dbName); } first = false; if (!first) sb.append(", "); sb.append("funcName:"); if (this.funcName == null) { sb.append("null"); } else { sb.append(this.funcName); } first = false; if (!first) sb.append(", "); sb.append("newFunc:"); if (this.newFunc == null) { sb.append("null"); } else { sb.append(this.newFunc); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (newFunc != null) { newFunc.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_function_argsStandardSchemeFactory implements SchemeFactory { public alter_function_argsStandardScheme getScheme() { return new alter_function_argsStandardScheme(); } } private static class alter_function_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FUNC_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_FUNC if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.newFunc = new Function(); struct.newFunc.read(iprot); struct.setNewFuncIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_function_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbName != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.dbName); oprot.writeFieldEnd(); } if (struct.funcName != null) { oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); oprot.writeString(struct.funcName); oprot.writeFieldEnd(); } if (struct.newFunc != null) { oprot.writeFieldBegin(NEW_FUNC_FIELD_DESC); struct.newFunc.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_function_argsTupleSchemeFactory implements SchemeFactory { public alter_function_argsTupleScheme getScheme() { return new alter_function_argsTupleScheme(); } } private static class alter_function_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbName()) { optionals.set(0); } if (struct.isSetFuncName()) { optionals.set(1); } if (struct.isSetNewFunc()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDbName()) { oprot.writeString(struct.dbName); } if (struct.isSetFuncName()) { oprot.writeString(struct.funcName); } if (struct.isSetNewFunc()) { struct.newFunc.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_function_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } if (incoming.get(1)) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } if (incoming.get(2)) { struct.newFunc = new Function(); struct.newFunc.read(iprot); struct.setNewFuncIsSet(true); } } } } public static class alter_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_function_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_function_resultTupleSchemeFactory()); } private InvalidOperationException o1; // required private MetaException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(alter_function_result.class, metaDataMap); } public alter_function_result() { } public alter_function_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public alter_function_result(alter_function_result other) { if (other.isSetO1()) { this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public alter_function_result deepCopy() { return new alter_function_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public InvalidOperationException getO1() { return this.o1; } public void setO1(InvalidOperationException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((InvalidOperationException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_function_result) return this.equals((alter_function_result)that); return false; } public boolean equals(alter_function_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(alter_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_function_result typedOther = (alter_function_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("alter_function_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class alter_function_resultStandardSchemeFactory implements SchemeFactory { public alter_function_resultStandardScheme getScheme() { return new alter_function_resultStandardScheme(); } } private static class alter_function_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, alter_function_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class alter_function_resultTupleSchemeFactory implements SchemeFactory { public alter_function_resultTupleScheme getScheme() { return new alter_function_resultTupleScheme(); } } private static class alter_function_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_function_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new InvalidOperationException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_functions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_functions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_functions_argsTupleSchemeFactory()); } private String dbName; // required private String pattern; // 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 { DB_NAME((short)1, "dbName"), PATTERN((short)2, "pattern"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // PATTERN return PATTERN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_args.class, metaDataMap); } public get_functions_args() { } public get_functions_args( String dbName, String pattern) { this(); this.dbName = dbName; this.pattern = pattern; } /** * Performs a deep copy on other. */ public get_functions_args(get_functions_args other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetPattern()) { this.pattern = other.pattern; } } public get_functions_args deepCopy() { return new get_functions_args(this); } @Override public void clear() { this.dbName = null; this.pattern = null; } public String getDbName() { return this.dbName; } public void setDbName(String dbName) { this.dbName = dbName; } public void unsetDbName() { this.dbName = null; } /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } public void setDbNameIsSet(boolean value) { if (!value) { this.dbName = null; } } public String getPattern() { return this.pattern; } public void setPattern(String pattern) { this.pattern = pattern; } public void unsetPattern() { this.pattern = null; } /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ public boolean isSetPattern() { return this.pattern != null; } public void setPatternIsSet(boolean value) { if (!value) { this.pattern = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDbName(); } else { setDbName((String)value); } break; case PATTERN: if (value == null) { unsetPattern(); } else { setPattern((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDbName(); case PATTERN: return getPattern(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDbName(); case PATTERN: return isSetPattern(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_functions_args) return this.equals((get_functions_args)that); return false; } public boolean equals(get_functions_args that) { if (that == null) return false; boolean this_present_dbName = true && this.isSetDbName(); boolean that_present_dbName = true && that.isSetDbName(); if (this_present_dbName || that_present_dbName) { if (!(this_present_dbName && that_present_dbName)) return false; if (!this.dbName.equals(that.dbName)) return false; } boolean this_present_pattern = true && this.isSetPattern(); boolean that_present_pattern = true && that.isSetPattern(); if (this_present_pattern || that_present_pattern) { if (!(this_present_pattern && that_present_pattern)) return false; if (!this.pattern.equals(that.pattern)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbName = true && (isSetDbName()); builder.append(present_dbName); if (present_dbName) builder.append(dbName); boolean present_pattern = true && (isSetPattern()); builder.append(present_pattern); if (present_pattern) builder.append(pattern); return builder.toHashCode(); } public int compareTo(get_functions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_functions_args typedOther = (get_functions_args)other; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_functions_args("); boolean first = true; sb.append("dbName:"); if (this.dbName == null) { sb.append("null"); } else { sb.append(this.dbName); } first = false; if (!first) sb.append(", "); sb.append("pattern:"); if (this.pattern == null) { sb.append("null"); } else { sb.append(this.pattern); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_functions_argsStandardSchemeFactory implements SchemeFactory { public get_functions_argsStandardScheme getScheme() { return new get_functions_argsStandardScheme(); } } private static class get_functions_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PATTERN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_functions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbName != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.dbName); oprot.writeFieldEnd(); } if (struct.pattern != null) { oprot.writeFieldBegin(PATTERN_FIELD_DESC); oprot.writeString(struct.pattern); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_functions_argsTupleSchemeFactory implements SchemeFactory { public get_functions_argsTupleScheme getScheme() { return new get_functions_argsTupleScheme(); } } private static class get_functions_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbName()) { optionals.set(0); } if (struct.isSetPattern()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbName()) { oprot.writeString(struct.dbName); } if (struct.isSetPattern()) { oprot.writeString(struct.pattern); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } if (incoming.get(1)) { struct.pattern = iprot.readString(); struct.setPatternIsSet(true); } } } } public static class get_functions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_functions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_functions_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_result.class, metaDataMap); } public get_functions_result() { } public get_functions_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_functions_result(get_functions_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_functions_result deepCopy() { return new get_functions_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_functions_result) return this.equals((get_functions_result)that); return false; } public boolean equals(get_functions_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_functions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_functions_result typedOther = (get_functions_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_functions_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_functions_resultStandardSchemeFactory implements SchemeFactory { public get_functions_resultStandardScheme getScheme() { return new get_functions_resultStandardScheme(); } } private static class get_functions_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list910 = iprot.readListBegin(); struct.success = new ArrayList(_list910.size); for (int _i911 = 0; _i911 < _list910.size; ++_i911) { String _elem912; // optional _elem912 = iprot.readString(); struct.success.add(_elem912); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_functions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter913 : struct.success) { oprot.writeString(_iter913); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_functions_resultTupleSchemeFactory implements SchemeFactory { public get_functions_resultTupleScheme getScheme() { return new get_functions_resultTupleScheme(); } } private static class get_functions_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter914 : struct.success) { oprot.writeString(_iter914); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list915 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list915.size); for (int _i916 = 0; _i916 < _list915.size; ++_i916) { String _elem917; // optional _elem917 = iprot.readString(); struct.success.add(_elem917); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_function_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_function_argsTupleSchemeFactory()); } private String dbName; // required private String funcName; // 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 { DB_NAME((short)1, "dbName"), FUNC_NAME((short)2, "funcName"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // DB_NAME return DB_NAME; case 2: // FUNC_NAME return FUNC_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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_args.class, metaDataMap); } public get_function_args() { } public get_function_args( String dbName, String funcName) { this(); this.dbName = dbName; this.funcName = funcName; } /** * Performs a deep copy on other. */ public get_function_args(get_function_args other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetFuncName()) { this.funcName = other.funcName; } } public get_function_args deepCopy() { return new get_function_args(this); } @Override public void clear() { this.dbName = null; this.funcName = null; } public String getDbName() { return this.dbName; } public void setDbName(String dbName) { this.dbName = dbName; } public void unsetDbName() { this.dbName = null; } /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } public void setDbNameIsSet(boolean value) { if (!value) { this.dbName = null; } } public String getFuncName() { return this.funcName; } public void setFuncName(String funcName) { this.funcName = funcName; } public void unsetFuncName() { this.funcName = null; } /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ public boolean isSetFuncName() { return this.funcName != null; } public void setFuncNameIsSet(boolean value) { if (!value) { this.funcName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDbName(); } else { setDbName((String)value); } break; case FUNC_NAME: if (value == null) { unsetFuncName(); } else { setFuncName((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDbName(); case FUNC_NAME: return getFuncName(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 DB_NAME: return isSetDbName(); case FUNC_NAME: return isSetFuncName(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_function_args) return this.equals((get_function_args)that); return false; } public boolean equals(get_function_args that) { if (that == null) return false; boolean this_present_dbName = true && this.isSetDbName(); boolean that_present_dbName = true && that.isSetDbName(); if (this_present_dbName || that_present_dbName) { if (!(this_present_dbName && that_present_dbName)) return false; if (!this.dbName.equals(that.dbName)) return false; } boolean this_present_funcName = true && this.isSetFuncName(); boolean that_present_funcName = true && that.isSetFuncName(); if (this_present_funcName || that_present_funcName) { if (!(this_present_funcName && that_present_funcName)) return false; if (!this.funcName.equals(that.funcName)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_dbName = true && (isSetDbName()); builder.append(present_dbName); if (present_dbName) builder.append(dbName); boolean present_funcName = true && (isSetFuncName()); builder.append(present_funcName); if (present_funcName) builder.append(funcName); return builder.toHashCode(); } public int compareTo(get_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_function_args typedOther = (get_function_args)other; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(typedOther.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, typedOther.funcName); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_function_args("); boolean first = true; sb.append("dbName:"); if (this.dbName == null) { sb.append("null"); } else { sb.append(this.dbName); } first = false; if (!first) sb.append(", "); sb.append("funcName:"); if (this.funcName == null) { sb.append("null"); } else { sb.append(this.funcName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_argsStandardSchemeFactory implements SchemeFactory { public get_function_argsStandardScheme getScheme() { return new get_function_argsStandardScheme(); } } private static class get_function_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FUNC_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.dbName != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(struct.dbName); oprot.writeFieldEnd(); } if (struct.funcName != null) { oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); oprot.writeString(struct.funcName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_argsTupleSchemeFactory implements SchemeFactory { public get_function_argsTupleScheme getScheme() { return new get_function_argsTupleScheme(); } } private static class get_function_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbName()) { optionals.set(0); } if (struct.isSetFuncName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetDbName()) { oprot.writeString(struct.dbName); } if (struct.isSetFuncName()) { oprot.writeString(struct.funcName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } if (incoming.get(1)) { struct.funcName = iprot.readString(); struct.setFuncNameIsSet(true); } } } } public static class get_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_function_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_function_resultTupleSchemeFactory()); } private Function success; // required private MetaException o1; // required private NoSuchObjectException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Function.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_result.class, metaDataMap); } public get_function_result() { } public get_function_result( Function success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public get_function_result(get_function_result other) { if (other.isSetSuccess()) { this.success = new Function(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_function_result deepCopy() { return new get_function_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public Function getSuccess() { return this.success; } public void setSuccess(Function 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Function)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_function_result) return this.equals((get_function_result)that); return false; } public boolean equals(get_function_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(get_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_function_result typedOther = (get_function_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_function_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_function_resultStandardSchemeFactory implements SchemeFactory { public get_function_resultStandardScheme getScheme() { return new get_function_resultStandardScheme(); } } private static class get_function_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new Function(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_function_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_function_resultTupleSchemeFactory implements SchemeFactory { public get_function_resultTupleScheme getScheme() { return new get_function_resultTupleScheme(); } } private static class get_function_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_function_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_function_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new Function(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new NoSuchObjectException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class create_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_args"); private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_role_argsTupleSchemeFactory()); } private Role role; // 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 { ROLE((short)1, "role"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // ROLE return ROLE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Role.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); } public create_role_args() { } public create_role_args( Role role) { this(); this.role = role; } /** * Performs a deep copy on other. */ public create_role_args(create_role_args other) { if (other.isSetRole()) { this.role = new Role(other.role); } } public create_role_args deepCopy() { return new create_role_args(this); } @Override public void clear() { this.role = null; } public Role getRole() { return this.role; } public void setRole(Role role) { this.role = role; } public void unsetRole() { this.role = null; } /** Returns true if field role is set (has been assigned a value) and false otherwise */ public boolean isSetRole() { return this.role != null; } public void setRoleIsSet(boolean value) { if (!value) { this.role = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case ROLE: if (value == null) { unsetRole(); } else { setRole((Role)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ROLE: return getRole(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 ROLE: return isSetRole(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_role_args) return this.equals((create_role_args)that); return false; } public boolean equals(create_role_args that) { if (that == null) return false; boolean this_present_role = true && this.isSetRole(); boolean that_present_role = true && that.isSetRole(); if (this_present_role || that_present_role) { if (!(this_present_role && that_present_role)) return false; if (!this.role.equals(that.role)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_role = true && (isSetRole()); builder.append(present_role); if (present_role) builder.append(role); return builder.toHashCode(); } public int compareTo(create_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_role_args typedOther = (create_role_args)other; lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole()); if (lastComparison != 0) { return lastComparison; } if (isSetRole()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_role_args("); boolean first = true; sb.append("role:"); if (this.role == null) { sb.append("null"); } else { sb.append(this.role); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (role != null) { role.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_role_argsStandardSchemeFactory implements SchemeFactory { public create_role_argsStandardScheme getScheme() { return new create_role_argsStandardScheme(); } } private static class create_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ROLE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.role = new Role(); struct.role.read(iprot); struct.setRoleIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.role != null) { oprot.writeFieldBegin(ROLE_FIELD_DESC); struct.role.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_role_argsTupleSchemeFactory implements SchemeFactory { public create_role_argsTupleScheme getScheme() { return new create_role_argsTupleScheme(); } } private static class create_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRole()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRole()) { struct.role.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.role = new Role(); struct.role.read(iprot); struct.setRoleIsSet(true); } } } } public static class create_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_role_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(create_role_result.class, metaDataMap); } public create_role_result() { } public create_role_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public create_role_result(create_role_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public create_role_result deepCopy() { return new create_role_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_role_result) return this.equals((create_role_result)that); return false; } public boolean equals(create_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(create_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_role_result typedOther = (create_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("create_role_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class create_role_resultStandardSchemeFactory implements SchemeFactory { public create_role_resultStandardScheme getScheme() { return new create_role_resultStandardScheme(); } } private static class create_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, create_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, create_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_role_resultTupleSchemeFactory implements SchemeFactory { public create_role_resultTupleScheme getScheme() { return new create_role_resultTupleScheme(); } } private static class create_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class drop_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_role_argsTupleSchemeFactory()); } private String role_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 { ROLE_NAME((short)1, "role_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // ROLE_NAME return ROLE_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.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_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(drop_role_args.class, metaDataMap); } public drop_role_args() { } public drop_role_args( String role_name) { this(); this.role_name = role_name; } /** * Performs a deep copy on other. */ public drop_role_args(drop_role_args other) { if (other.isSetRole_name()) { this.role_name = other.role_name; } } public drop_role_args deepCopy() { return new drop_role_args(this); } @Override public void clear() { this.role_name = null; } public String getRole_name() { return this.role_name; } public void setRole_name(String role_name) { this.role_name = role_name; } public void unsetRole_name() { this.role_name = null; } /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ public boolean isSetRole_name() { return this.role_name != null; } public void setRole_nameIsSet(boolean value) { if (!value) { this.role_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case ROLE_NAME: if (value == null) { unsetRole_name(); } else { setRole_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRole_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 ROLE_NAME: return isSetRole_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_role_args) return this.equals((drop_role_args)that); return false; } public boolean equals(drop_role_args that) { if (that == null) return false; boolean this_present_role_name = true && this.isSetRole_name(); boolean that_present_role_name = true && that.isSetRole_name(); if (this_present_role_name || that_present_role_name) { if (!(this_present_role_name && that_present_role_name)) return false; if (!this.role_name.equals(that.role_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_role_name = true && (isSetRole_name()); builder.append(present_role_name); if (present_role_name) builder.append(role_name); return builder.toHashCode(); } public int compareTo(drop_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_role_args typedOther = (drop_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_role_args("); boolean first = true; sb.append("role_name:"); if (this.role_name == null) { sb.append("null"); } else { sb.append(this.role_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_role_argsStandardSchemeFactory implements SchemeFactory { public drop_role_argsStandardScheme getScheme() { return new drop_role_argsStandardScheme(); } } private static class drop_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ROLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.role_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_role_argsTupleSchemeFactory implements SchemeFactory { public drop_role_argsTupleScheme getScheme() { return new drop_role_argsTupleScheme(); } } private static class drop_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRole_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRole_name()) { oprot.writeString(struct.role_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } } } } public static class drop_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_role_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(drop_role_result.class, metaDataMap); } public drop_role_result() { } public drop_role_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public drop_role_result(drop_role_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public drop_role_result deepCopy() { return new drop_role_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_role_result) return this.equals((drop_role_result)that); return false; } public boolean equals(drop_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(drop_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_role_result typedOther = (drop_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("drop_role_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class drop_role_resultStandardSchemeFactory implements SchemeFactory { public drop_role_resultStandardScheme getScheme() { return new drop_role_resultStandardScheme(); } } private static class drop_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, drop_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class drop_role_resultTupleSchemeFactory implements SchemeFactory { public drop_role_resultTupleScheme getScheme() { return new drop_role_resultTupleScheme(); } } private static class drop_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, drop_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_role_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_role_names_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_role_names_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_role_names_args.class, metaDataMap); } public get_role_names_args() { } /** * Performs a deep copy on other. */ public get_role_names_args(get_role_names_args other) { } public get_role_names_args deepCopy() { return new get_role_names_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 get_role_names_args) return this.equals((get_role_names_args)that); return false; } public boolean equals(get_role_names_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(get_role_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_names_args typedOther = (get_role_names_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_role_names_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_role_names_argsStandardSchemeFactory implements SchemeFactory { public get_role_names_argsStandardScheme getScheme() { return new get_role_names_argsStandardScheme(); } } private static class get_role_names_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_role_names_argsTupleSchemeFactory implements SchemeFactory { public get_role_names_argsTupleScheme getScheme() { return new get_role_names_argsTupleScheme(); } } private static class get_role_names_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_role_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_role_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_role_names_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_result.class, metaDataMap); } public get_role_names_result() { } public get_role_names_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_role_names_result(get_role_names_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_role_names_result deepCopy() { return new get_role_names_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_role_names_result) return this.equals((get_role_names_result)that); return false; } public boolean equals(get_role_names_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_role_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_names_result typedOther = (get_role_names_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_role_names_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_role_names_resultStandardSchemeFactory implements SchemeFactory { public get_role_names_resultStandardScheme getScheme() { return new get_role_names_resultStandardScheme(); } } private static class get_role_names_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_names_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list918 = iprot.readListBegin(); struct.success = new ArrayList(_list918.size); for (int _i919 = 0; _i919 < _list918.size; ++_i919) { String _elem920; // optional _elem920 = iprot.readString(); struct.success.add(_elem920); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_names_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter921 : struct.success) { oprot.writeString(_iter921); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_role_names_resultTupleSchemeFactory implements SchemeFactory { public get_role_names_resultTupleScheme getScheme() { return new get_role_names_resultTupleScheme(); } } private static class get_role_names_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter922 : struct.success) { oprot.writeString(_iter922); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_role_names_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list923 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list923.size); for (int _i924 = 0; _i924 < _list923.size; ++_i924) { String _elem925; // optional _elem925 = iprot.readString(); struct.success.add(_elem925); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class grant_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grant_option", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_role_argsTupleSchemeFactory()); } private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // required private String grantor; // required private PrincipalType grantorType; // required private boolean grant_option; // 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 { ROLE_NAME((short)1, "role_name"), PRINCIPAL_NAME((short)2, "principal_name"), /** * * @see PrincipalType */ PRINCIPAL_TYPE((short)3, "principal_type"), GRANTOR((short)4, "grantor"), /** * * @see PrincipalType */ GRANTOR_TYPE((short)5, "grantorType"), GRANT_OPTION((short)6, "grant_option"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // ROLE_NAME return ROLE_NAME; case 2: // PRINCIPAL_NAME return PRINCIPAL_NAME; case 3: // PRINCIPAL_TYPE return PRINCIPAL_TYPE; case 4: // GRANTOR return GRANTOR; case 5: // GRANTOR_TYPE return GRANTOR_TYPE; case 6: // GRANT_OPTION return GRANT_OPTION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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 __GRANT_OPTION_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grant_option", 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(grant_role_args.class, metaDataMap); } public grant_role_args() { } public grant_role_args( String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) { this(); this.role_name = role_name; this.principal_name = principal_name; this.principal_type = principal_type; this.grantor = grantor; this.grantorType = grantorType; this.grant_option = grant_option; setGrant_optionIsSet(true); } /** * Performs a deep copy on other. */ public grant_role_args(grant_role_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRole_name()) { this.role_name = other.role_name; } if (other.isSetPrincipal_name()) { this.principal_name = other.principal_name; } if (other.isSetPrincipal_type()) { this.principal_type = other.principal_type; } if (other.isSetGrantor()) { this.grantor = other.grantor; } if (other.isSetGrantorType()) { this.grantorType = other.grantorType; } this.grant_option = other.grant_option; } public grant_role_args deepCopy() { return new grant_role_args(this); } @Override public void clear() { this.role_name = null; this.principal_name = null; this.principal_type = null; this.grantor = null; this.grantorType = null; setGrant_optionIsSet(false); this.grant_option = false; } public String getRole_name() { return this.role_name; } public void setRole_name(String role_name) { this.role_name = role_name; } public void unsetRole_name() { this.role_name = null; } /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ public boolean isSetRole_name() { return this.role_name != null; } public void setRole_nameIsSet(boolean value) { if (!value) { this.role_name = null; } } public String getPrincipal_name() { return this.principal_name; } public void setPrincipal_name(String principal_name) { this.principal_name = principal_name; } public void unsetPrincipal_name() { this.principal_name = null; } /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_name() { return this.principal_name != null; } public void setPrincipal_nameIsSet(boolean value) { if (!value) { this.principal_name = null; } } /** * * @see PrincipalType */ public PrincipalType getPrincipal_type() { return this.principal_type; } /** * * @see PrincipalType */ public void setPrincipal_type(PrincipalType principal_type) { this.principal_type = principal_type; } public void unsetPrincipal_type() { this.principal_type = null; } /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_type() { return this.principal_type != null; } public void setPrincipal_typeIsSet(boolean value) { if (!value) { this.principal_type = null; } } public String getGrantor() { return this.grantor; } public void setGrantor(String grantor) { this.grantor = grantor; } public void unsetGrantor() { this.grantor = null; } /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ public boolean isSetGrantor() { return this.grantor != null; } public void setGrantorIsSet(boolean value) { if (!value) { this.grantor = null; } } /** * * @see PrincipalType */ public PrincipalType getGrantorType() { return this.grantorType; } /** * * @see PrincipalType */ public void setGrantorType(PrincipalType grantorType) { this.grantorType = grantorType; } public void unsetGrantorType() { this.grantorType = null; } /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ public boolean isSetGrantorType() { return this.grantorType != null; } public void setGrantorTypeIsSet(boolean value) { if (!value) { this.grantorType = null; } } public boolean isGrant_option() { return this.grant_option; } public void setGrant_option(boolean grant_option) { this.grant_option = grant_option; setGrant_optionIsSet(true); } public void unsetGrant_option() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } /** Returns true if field grant_option is set (has been assigned a value) and false otherwise */ public boolean isSetGrant_option() { return EncodingUtils.testBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); } public void setGrant_optionIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case ROLE_NAME: if (value == null) { unsetRole_name(); } else { setRole_name((String)value); } break; case PRINCIPAL_NAME: if (value == null) { unsetPrincipal_name(); } else { setPrincipal_name((String)value); } break; case PRINCIPAL_TYPE: if (value == null) { unsetPrincipal_type(); } else { setPrincipal_type((PrincipalType)value); } break; case GRANTOR: if (value == null) { unsetGrantor(); } else { setGrantor((String)value); } break; case GRANTOR_TYPE: if (value == null) { unsetGrantorType(); } else { setGrantorType((PrincipalType)value); } break; case GRANT_OPTION: if (value == null) { unsetGrant_option(); } else { setGrant_option((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRole_name(); case PRINCIPAL_NAME: return getPrincipal_name(); case PRINCIPAL_TYPE: return getPrincipal_type(); case GRANTOR: return getGrantor(); case GRANTOR_TYPE: return getGrantorType(); case GRANT_OPTION: return Boolean.valueOf(isGrant_option()); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 ROLE_NAME: return isSetRole_name(); case PRINCIPAL_NAME: return isSetPrincipal_name(); case PRINCIPAL_TYPE: return isSetPrincipal_type(); case GRANTOR: return isSetGrantor(); case GRANTOR_TYPE: return isSetGrantorType(); case GRANT_OPTION: return isSetGrant_option(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_role_args) return this.equals((grant_role_args)that); return false; } public boolean equals(grant_role_args that) { if (that == null) return false; boolean this_present_role_name = true && this.isSetRole_name(); boolean that_present_role_name = true && that.isSetRole_name(); if (this_present_role_name || that_present_role_name) { if (!(this_present_role_name && that_present_role_name)) return false; if (!this.role_name.equals(that.role_name)) return false; } boolean this_present_principal_name = true && this.isSetPrincipal_name(); boolean that_present_principal_name = true && that.isSetPrincipal_name(); if (this_present_principal_name || that_present_principal_name) { if (!(this_present_principal_name && that_present_principal_name)) return false; if (!this.principal_name.equals(that.principal_name)) return false; } boolean this_present_principal_type = true && this.isSetPrincipal_type(); boolean that_present_principal_type = true && that.isSetPrincipal_type(); if (this_present_principal_type || that_present_principal_type) { if (!(this_present_principal_type && that_present_principal_type)) return false; if (!this.principal_type.equals(that.principal_type)) return false; } boolean this_present_grantor = true && this.isSetGrantor(); boolean that_present_grantor = true && that.isSetGrantor(); if (this_present_grantor || that_present_grantor) { if (!(this_present_grantor && that_present_grantor)) return false; if (!this.grantor.equals(that.grantor)) return false; } boolean this_present_grantorType = true && this.isSetGrantorType(); boolean that_present_grantorType = true && that.isSetGrantorType(); if (this_present_grantorType || that_present_grantorType) { if (!(this_present_grantorType && that_present_grantorType)) return false; if (!this.grantorType.equals(that.grantorType)) return false; } boolean this_present_grant_option = true; boolean that_present_grant_option = true; if (this_present_grant_option || that_present_grant_option) { if (!(this_present_grant_option && that_present_grant_option)) return false; if (this.grant_option != that.grant_option) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_role_name = true && (isSetRole_name()); builder.append(present_role_name); if (present_role_name) builder.append(role_name); boolean present_principal_name = true && (isSetPrincipal_name()); builder.append(present_principal_name); if (present_principal_name) builder.append(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); builder.append(present_principal_type); if (present_principal_type) builder.append(principal_type.getValue()); boolean present_grantor = true && (isSetGrantor()); builder.append(present_grantor); if (present_grantor) builder.append(grantor); boolean present_grantorType = true && (isSetGrantorType()); builder.append(present_grantorType); if (present_grantorType) builder.append(grantorType.getValue()); boolean present_grant_option = true; builder.append(present_grant_option); if (present_grant_option) builder.append(grant_option); return builder.toHashCode(); } public int compareTo(grant_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_role_args typedOther = (grant_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, typedOther.grantor); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(typedOther.isSetGrantorType()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantorType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, typedOther.grantorType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(typedOther.isSetGrant_option()); if (lastComparison != 0) { return lastComparison; } if (isSetGrant_option()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_option, typedOther.grant_option); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_role_args("); boolean first = true; sb.append("role_name:"); if (this.role_name == null) { sb.append("null"); } else { sb.append(this.role_name); } first = false; if (!first) sb.append(", "); sb.append("principal_name:"); if (this.principal_name == null) { sb.append("null"); } else { sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); sb.append("principal_type:"); if (this.principal_type == null) { sb.append("null"); } else { sb.append(this.principal_type); } first = false; if (!first) sb.append(", "); sb.append("grantor:"); if (this.grantor == null) { sb.append("null"); } else { sb.append(this.grantor); } first = false; if (!first) sb.append(", "); sb.append("grantorType:"); if (this.grantorType == null) { sb.append("null"); } else { sb.append(this.grantorType); } first = false; if (!first) sb.append(", "); sb.append("grant_option:"); sb.append(this.grant_option); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_role_argsStandardSchemeFactory implements SchemeFactory { public grant_role_argsStandardScheme getScheme() { return new grant_role_argsStandardScheme(); } } private static class grant_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ROLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PRINCIPAL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PRINCIPAL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // GRANTOR if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.grantor = iprot.readString(); struct.setGrantorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // GRANTOR_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.grantorType = PrincipalType.findByValue(iprot.readI32()); struct.setGrantorTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // GRANT_OPTION if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.grant_option = iprot.readBool(); struct.setGrant_optionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.role_name); oprot.writeFieldEnd(); } if (struct.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(struct.principal_name); oprot.writeFieldEnd(); } if (struct.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(struct.principal_type.getValue()); oprot.writeFieldEnd(); } if (struct.grantor != null) { oprot.writeFieldBegin(GRANTOR_FIELD_DESC); oprot.writeString(struct.grantor); oprot.writeFieldEnd(); } if (struct.grantorType != null) { oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); oprot.writeI32(struct.grantorType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); oprot.writeBool(struct.grant_option); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_role_argsTupleSchemeFactory implements SchemeFactory { public grant_role_argsTupleScheme getScheme() { return new grant_role_argsTupleScheme(); } } private static class grant_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRole_name()) { optionals.set(0); } if (struct.isSetPrincipal_name()) { optionals.set(1); } if (struct.isSetPrincipal_type()) { optionals.set(2); } if (struct.isSetGrantor()) { optionals.set(3); } if (struct.isSetGrantorType()) { optionals.set(4); } if (struct.isSetGrant_option()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetRole_name()) { oprot.writeString(struct.role_name); } if (struct.isSetPrincipal_name()) { oprot.writeString(struct.principal_name); } if (struct.isSetPrincipal_type()) { oprot.writeI32(struct.principal_type.getValue()); } if (struct.isSetGrantor()) { oprot.writeString(struct.grantor); } if (struct.isSetGrantorType()) { oprot.writeI32(struct.grantorType.getValue()); } if (struct.isSetGrant_option()) { oprot.writeBool(struct.grant_option); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } if (incoming.get(1)) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } if (incoming.get(2)) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } if (incoming.get(3)) { struct.grantor = iprot.readString(); struct.setGrantorIsSet(true); } if (incoming.get(4)) { struct.grantorType = PrincipalType.findByValue(iprot.readI32()); struct.setGrantorTypeIsSet(true); } if (incoming.get(5)) { struct.grant_option = iprot.readBool(); struct.setGrant_optionIsSet(true); } } } } public static class grant_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_role_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(grant_role_result.class, metaDataMap); } public grant_role_result() { } public grant_role_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public grant_role_result(grant_role_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public grant_role_result deepCopy() { return new grant_role_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_role_result) return this.equals((grant_role_result)that); return false; } public boolean equals(grant_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(grant_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_role_result typedOther = (grant_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_role_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_role_resultStandardSchemeFactory implements SchemeFactory { public grant_role_resultStandardScheme getScheme() { return new grant_role_resultStandardScheme(); } } private static class grant_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_role_resultTupleSchemeFactory implements SchemeFactory { public grant_role_resultTupleScheme getScheme() { return new grant_role_resultTupleScheme(); } } private static class grant_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revoke_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new revoke_role_argsTupleSchemeFactory()); } private String role_name; // required private String principal_name; // required private PrincipalType principal_type; // 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 { ROLE_NAME((short)1, "role_name"), PRINCIPAL_NAME((short)2, "principal_name"), /** * * @see PrincipalType */ PRINCIPAL_TYPE((short)3, "principal_type"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // ROLE_NAME return ROLE_NAME; case 2: // PRINCIPAL_NAME return PRINCIPAL_NAME; case 3: // PRINCIPAL_TYPE return PRINCIPAL_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.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap); } public revoke_role_args() { } public revoke_role_args( String role_name, String principal_name, PrincipalType principal_type) { this(); this.role_name = role_name; this.principal_name = principal_name; this.principal_type = principal_type; } /** * Performs a deep copy on other. */ public revoke_role_args(revoke_role_args other) { if (other.isSetRole_name()) { this.role_name = other.role_name; } if (other.isSetPrincipal_name()) { this.principal_name = other.principal_name; } if (other.isSetPrincipal_type()) { this.principal_type = other.principal_type; } } public revoke_role_args deepCopy() { return new revoke_role_args(this); } @Override public void clear() { this.role_name = null; this.principal_name = null; this.principal_type = null; } public String getRole_name() { return this.role_name; } public void setRole_name(String role_name) { this.role_name = role_name; } public void unsetRole_name() { this.role_name = null; } /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ public boolean isSetRole_name() { return this.role_name != null; } public void setRole_nameIsSet(boolean value) { if (!value) { this.role_name = null; } } public String getPrincipal_name() { return this.principal_name; } public void setPrincipal_name(String principal_name) { this.principal_name = principal_name; } public void unsetPrincipal_name() { this.principal_name = null; } /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_name() { return this.principal_name != null; } public void setPrincipal_nameIsSet(boolean value) { if (!value) { this.principal_name = null; } } /** * * @see PrincipalType */ public PrincipalType getPrincipal_type() { return this.principal_type; } /** * * @see PrincipalType */ public void setPrincipal_type(PrincipalType principal_type) { this.principal_type = principal_type; } public void unsetPrincipal_type() { this.principal_type = null; } /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_type() { return this.principal_type != null; } public void setPrincipal_typeIsSet(boolean value) { if (!value) { this.principal_type = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case ROLE_NAME: if (value == null) { unsetRole_name(); } else { setRole_name((String)value); } break; case PRINCIPAL_NAME: if (value == null) { unsetPrincipal_name(); } else { setPrincipal_name((String)value); } break; case PRINCIPAL_TYPE: if (value == null) { unsetPrincipal_type(); } else { setPrincipal_type((PrincipalType)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRole_name(); case PRINCIPAL_NAME: return getPrincipal_name(); case PRINCIPAL_TYPE: return getPrincipal_type(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 ROLE_NAME: return isSetRole_name(); case PRINCIPAL_NAME: return isSetPrincipal_name(); case PRINCIPAL_TYPE: return isSetPrincipal_type(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_role_args) return this.equals((revoke_role_args)that); return false; } public boolean equals(revoke_role_args that) { if (that == null) return false; boolean this_present_role_name = true && this.isSetRole_name(); boolean that_present_role_name = true && that.isSetRole_name(); if (this_present_role_name || that_present_role_name) { if (!(this_present_role_name && that_present_role_name)) return false; if (!this.role_name.equals(that.role_name)) return false; } boolean this_present_principal_name = true && this.isSetPrincipal_name(); boolean that_present_principal_name = true && that.isSetPrincipal_name(); if (this_present_principal_name || that_present_principal_name) { if (!(this_present_principal_name && that_present_principal_name)) return false; if (!this.principal_name.equals(that.principal_name)) return false; } boolean this_present_principal_type = true && this.isSetPrincipal_type(); boolean that_present_principal_type = true && that.isSetPrincipal_type(); if (this_present_principal_type || that_present_principal_type) { if (!(this_present_principal_type && that_present_principal_type)) return false; if (!this.principal_type.equals(that.principal_type)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_role_name = true && (isSetRole_name()); builder.append(present_role_name); if (present_role_name) builder.append(role_name); boolean present_principal_name = true && (isSetPrincipal_name()); builder.append(present_principal_name); if (present_principal_name) builder.append(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); builder.append(present_principal_type); if (present_principal_type) builder.append(principal_type.getValue()); return builder.toHashCode(); } public int compareTo(revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_role_args typedOther = (revoke_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revoke_role_args("); boolean first = true; sb.append("role_name:"); if (this.role_name == null) { sb.append("null"); } else { sb.append(this.role_name); } first = false; if (!first) sb.append(", "); sb.append("principal_name:"); if (this.principal_name == null) { sb.append("null"); } else { sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); sb.append("principal_type:"); if (this.principal_type == null) { sb.append("null"); } else { sb.append(this.principal_type); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class revoke_role_argsStandardSchemeFactory implements SchemeFactory { public revoke_role_argsStandardScheme getScheme() { return new revoke_role_argsStandardScheme(); } } private static class revoke_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ROLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PRINCIPAL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PRINCIPAL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(struct.role_name); oprot.writeFieldEnd(); } if (struct.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(struct.principal_name); oprot.writeFieldEnd(); } if (struct.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(struct.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revoke_role_argsTupleSchemeFactory implements SchemeFactory { public revoke_role_argsTupleScheme getScheme() { return new revoke_role_argsTupleScheme(); } } private static class revoke_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRole_name()) { optionals.set(0); } if (struct.isSetPrincipal_name()) { optionals.set(1); } if (struct.isSetPrincipal_type()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetRole_name()) { oprot.writeString(struct.role_name); } if (struct.isSetPrincipal_name()) { oprot.writeString(struct.principal_name); } if (struct.isSetPrincipal_type()) { oprot.writeI32(struct.principal_type.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.role_name = iprot.readString(); struct.setRole_nameIsSet(true); } if (incoming.get(1)) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } if (incoming.get(2)) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } } } } public static class revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revoke_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new revoke_role_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(revoke_role_result.class, metaDataMap); } public revoke_role_result() { } public revoke_role_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public revoke_role_result(revoke_role_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public revoke_role_result deepCopy() { return new revoke_role_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_role_result) return this.equals((revoke_role_result)that); return false; } public boolean equals(revoke_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_role_result typedOther = (revoke_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revoke_role_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class revoke_role_resultStandardSchemeFactory implements SchemeFactory { public revoke_role_resultStandardScheme getScheme() { return new revoke_role_resultStandardScheme(); } } private static class revoke_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revoke_role_resultTupleSchemeFactory implements SchemeFactory { public revoke_role_resultTupleScheme getScheme() { return new revoke_role_resultTupleScheme(); } } private static class revoke_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revoke_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class list_roles_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_args"); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_roles_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_roles_argsTupleSchemeFactory()); } private String principal_name; // required private PrincipalType principal_type; // 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 { PRINCIPAL_NAME((short)1, "principal_name"), /** * * @see PrincipalType */ PRINCIPAL_TYPE((short)2, "principal_type"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PRINCIPAL_NAME return PRINCIPAL_NAME; case 2: // PRINCIPAL_TYPE return PRINCIPAL_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.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); } public list_roles_args() { } public list_roles_args( String principal_name, PrincipalType principal_type) { this(); this.principal_name = principal_name; this.principal_type = principal_type; } /** * Performs a deep copy on other. */ public list_roles_args(list_roles_args other) { if (other.isSetPrincipal_name()) { this.principal_name = other.principal_name; } if (other.isSetPrincipal_type()) { this.principal_type = other.principal_type; } } public list_roles_args deepCopy() { return new list_roles_args(this); } @Override public void clear() { this.principal_name = null; this.principal_type = null; } public String getPrincipal_name() { return this.principal_name; } public void setPrincipal_name(String principal_name) { this.principal_name = principal_name; } public void unsetPrincipal_name() { this.principal_name = null; } /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_name() { return this.principal_name != null; } public void setPrincipal_nameIsSet(boolean value) { if (!value) { this.principal_name = null; } } /** * * @see PrincipalType */ public PrincipalType getPrincipal_type() { return this.principal_type; } /** * * @see PrincipalType */ public void setPrincipal_type(PrincipalType principal_type) { this.principal_type = principal_type; } public void unsetPrincipal_type() { this.principal_type = null; } /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_type() { return this.principal_type != null; } public void setPrincipal_typeIsSet(boolean value) { if (!value) { this.principal_type = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PRINCIPAL_NAME: if (value == null) { unsetPrincipal_name(); } else { setPrincipal_name((String)value); } break; case PRINCIPAL_TYPE: if (value == null) { unsetPrincipal_type(); } else { setPrincipal_type((PrincipalType)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PRINCIPAL_NAME: return getPrincipal_name(); case PRINCIPAL_TYPE: return getPrincipal_type(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PRINCIPAL_NAME: return isSetPrincipal_name(); case PRINCIPAL_TYPE: return isSetPrincipal_type(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_roles_args) return this.equals((list_roles_args)that); return false; } public boolean equals(list_roles_args that) { if (that == null) return false; boolean this_present_principal_name = true && this.isSetPrincipal_name(); boolean that_present_principal_name = true && that.isSetPrincipal_name(); if (this_present_principal_name || that_present_principal_name) { if (!(this_present_principal_name && that_present_principal_name)) return false; if (!this.principal_name.equals(that.principal_name)) return false; } boolean this_present_principal_type = true && this.isSetPrincipal_type(); boolean that_present_principal_type = true && that.isSetPrincipal_type(); if (this_present_principal_type || that_present_principal_type) { if (!(this_present_principal_type && that_present_principal_type)) return false; if (!this.principal_type.equals(that.principal_type)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_principal_name = true && (isSetPrincipal_name()); builder.append(present_principal_name); if (present_principal_name) builder.append(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); builder.append(present_principal_type); if (present_principal_type) builder.append(principal_type.getValue()); return builder.toHashCode(); } public int compareTo(list_roles_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_roles_args typedOther = (list_roles_args)other; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_roles_args("); boolean first = true; sb.append("principal_name:"); if (this.principal_name == null) { sb.append("null"); } else { sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); sb.append("principal_type:"); if (this.principal_type == null) { sb.append("null"); } else { sb.append(this.principal_type); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class list_roles_argsStandardSchemeFactory implements SchemeFactory { public list_roles_argsStandardScheme getScheme() { return new list_roles_argsStandardScheme(); } } private static class list_roles_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PRINCIPAL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PRINCIPAL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(struct.principal_name); oprot.writeFieldEnd(); } if (struct.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(struct.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class list_roles_argsTupleSchemeFactory implements SchemeFactory { public list_roles_argsTupleScheme getScheme() { return new list_roles_argsTupleScheme(); } } private static class list_roles_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrincipal_name()) { optionals.set(0); } if (struct.isSetPrincipal_type()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPrincipal_name()) { oprot.writeString(struct.principal_name); } if (struct.isSetPrincipal_type()) { oprot.writeI32(struct.principal_type.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } if (incoming.get(1)) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } } } } public static class list_roles_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_roles_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_roles_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, Role.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(list_roles_result.class, metaDataMap); } public list_roles_result() { } public list_roles_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public list_roles_result(list_roles_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (Role other_element : other.success) { __this__success.add(new Role(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public list_roles_result deepCopy() { return new list_roles_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Role elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_roles_result) return this.equals((list_roles_result)that); return false; } public boolean equals(list_roles_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(list_roles_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_roles_result typedOther = (list_roles_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_roles_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class list_roles_resultStandardSchemeFactory implements SchemeFactory { public list_roles_resultStandardScheme getScheme() { return new list_roles_resultStandardScheme(); } } private static class list_roles_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, list_roles_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list926 = iprot.readListBegin(); struct.success = new ArrayList(_list926.size); for (int _i927 = 0; _i927 < _list926.size; ++_i927) { Role _elem928; // optional _elem928 = new Role(); _elem928.read(iprot); struct.success.add(_elem928); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, list_roles_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Role _iter929 : struct.success) { _iter929.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class list_roles_resultTupleSchemeFactory implements SchemeFactory { public list_roles_resultTupleScheme getScheme() { return new list_roles_resultTupleScheme(); } } private static class list_roles_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Role _iter930 : struct.success) { _iter930.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, list_roles_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list931 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list931.size); for (int _i932 = 0; _i932 < _list931.size; ++_i932) { Role _elem933; // optional _elem933 = new Role(); _elem933.read(iprot); struct.success.add(_elem933); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class grant_revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_revoke_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_revoke_role_argsTupleSchemeFactory()); } private GrantRevokeRoleRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokeRoleRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_role_args.class, metaDataMap); } public grant_revoke_role_args() { } public grant_revoke_role_args( GrantRevokeRoleRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public grant_revoke_role_args(grant_revoke_role_args other) { if (other.isSetRequest()) { this.request = new GrantRevokeRoleRequest(other.request); } } public grant_revoke_role_args deepCopy() { return new grant_revoke_role_args(this); } @Override public void clear() { this.request = null; } public GrantRevokeRoleRequest getRequest() { return this.request; } public void setRequest(GrantRevokeRoleRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((GrantRevokeRoleRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_revoke_role_args) return this.equals((grant_revoke_role_args)that); return false; } public boolean equals(grant_revoke_role_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(grant_revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_revoke_role_args typedOther = (grant_revoke_role_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_revoke_role_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_revoke_role_argsStandardSchemeFactory implements SchemeFactory { public grant_revoke_role_argsStandardScheme getScheme() { return new grant_revoke_role_argsStandardScheme(); } } private static class grant_revoke_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new GrantRevokeRoleRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_revoke_role_argsTupleSchemeFactory implements SchemeFactory { public grant_revoke_role_argsTupleScheme getScheme() { return new grant_revoke_role_argsTupleScheme(); } } private static class grant_revoke_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new GrantRevokeRoleRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class grant_revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_revoke_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_revoke_role_resultTupleSchemeFactory()); } private GrantRevokeRoleResponse success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, GrantRevokeRoleResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(grant_revoke_role_result.class, metaDataMap); } public grant_revoke_role_result() { } public grant_revoke_role_result( GrantRevokeRoleResponse success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public grant_revoke_role_result(grant_revoke_role_result other) { if (other.isSetSuccess()) { this.success = new GrantRevokeRoleResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public grant_revoke_role_result deepCopy() { return new grant_revoke_role_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public GrantRevokeRoleResponse getSuccess() { return this.success; } public void setSuccess(GrantRevokeRoleResponse 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((GrantRevokeRoleResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_revoke_role_result) return this.equals((grant_revoke_role_result)that); return false; } public boolean equals(grant_revoke_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(grant_revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_revoke_role_result typedOther = (grant_revoke_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_revoke_role_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_revoke_role_resultStandardSchemeFactory implements SchemeFactory { public grant_revoke_role_resultStandardScheme getScheme() { return new grant_revoke_role_resultStandardScheme(); } } private static class grant_revoke_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GrantRevokeRoleResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_revoke_role_resultTupleSchemeFactory implements SchemeFactory { public grant_revoke_role_resultTupleScheme getScheme() { return new grant_revoke_role_resultTupleScheme(); } } private static class grant_revoke_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GrantRevokeRoleResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_principals_in_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_principals_in_role_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_principals_in_role_argsTupleSchemeFactory()); } private GetPrincipalsInRoleRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPrincipalsInRoleRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_args.class, metaDataMap); } public get_principals_in_role_args() { } public get_principals_in_role_args( GetPrincipalsInRoleRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public get_principals_in_role_args(get_principals_in_role_args other) { if (other.isSetRequest()) { this.request = new GetPrincipalsInRoleRequest(other.request); } } public get_principals_in_role_args deepCopy() { return new get_principals_in_role_args(this); } @Override public void clear() { this.request = null; } public GetPrincipalsInRoleRequest getRequest() { return this.request; } public void setRequest(GetPrincipalsInRoleRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((GetPrincipalsInRoleRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_principals_in_role_args) return this.equals((get_principals_in_role_args)that); return false; } public boolean equals(get_principals_in_role_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(get_principals_in_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_principals_in_role_args typedOther = (get_principals_in_role_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_principals_in_role_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_principals_in_role_argsStandardSchemeFactory implements SchemeFactory { public get_principals_in_role_argsStandardScheme getScheme() { return new get_principals_in_role_argsStandardScheme(); } } private static class get_principals_in_role_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_role_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new GetPrincipalsInRoleRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_principals_in_role_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_principals_in_role_argsTupleSchemeFactory implements SchemeFactory { public get_principals_in_role_argsTupleScheme getScheme() { return new get_principals_in_role_argsTupleScheme(); } } private static class get_principals_in_role_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new GetPrincipalsInRoleRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_principals_in_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_principals_in_role_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_principals_in_role_resultTupleSchemeFactory()); } private GetPrincipalsInRoleResponse success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, GetPrincipalsInRoleResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_result.class, metaDataMap); } public get_principals_in_role_result() { } public get_principals_in_role_result( GetPrincipalsInRoleResponse success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_principals_in_role_result(get_principals_in_role_result other) { if (other.isSetSuccess()) { this.success = new GetPrincipalsInRoleResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_principals_in_role_result deepCopy() { return new get_principals_in_role_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public GetPrincipalsInRoleResponse getSuccess() { return this.success; } public void setSuccess(GetPrincipalsInRoleResponse 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((GetPrincipalsInRoleResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_principals_in_role_result) return this.equals((get_principals_in_role_result)that); return false; } public boolean equals(get_principals_in_role_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_principals_in_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_principals_in_role_result typedOther = (get_principals_in_role_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_principals_in_role_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_principals_in_role_resultStandardSchemeFactory implements SchemeFactory { public get_principals_in_role_resultStandardScheme getScheme() { return new get_principals_in_role_resultStandardScheme(); } } private static class get_principals_in_role_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_role_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GetPrincipalsInRoleResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_principals_in_role_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_principals_in_role_resultTupleSchemeFactory implements SchemeFactory { public get_principals_in_role_resultTupleScheme getScheme() { return new get_principals_in_role_resultTupleScheme(); } } private static class get_principals_in_role_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetPrincipalsInRoleResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_role_grants_for_principal_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_role_grants_for_principal_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_role_grants_for_principal_argsTupleSchemeFactory()); } private GetRoleGrantsForPrincipalRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetRoleGrantsForPrincipalRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_args.class, metaDataMap); } public get_role_grants_for_principal_args() { } public get_role_grants_for_principal_args( GetRoleGrantsForPrincipalRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public get_role_grants_for_principal_args(get_role_grants_for_principal_args other) { if (other.isSetRequest()) { this.request = new GetRoleGrantsForPrincipalRequest(other.request); } } public get_role_grants_for_principal_args deepCopy() { return new get_role_grants_for_principal_args(this); } @Override public void clear() { this.request = null; } public GetRoleGrantsForPrincipalRequest getRequest() { return this.request; } public void setRequest(GetRoleGrantsForPrincipalRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((GetRoleGrantsForPrincipalRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_role_grants_for_principal_args) return this.equals((get_role_grants_for_principal_args)that); return false; } public boolean equals(get_role_grants_for_principal_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(get_role_grants_for_principal_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_grants_for_principal_args typedOther = (get_role_grants_for_principal_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_role_grants_for_principal_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_role_grants_for_principal_argsStandardSchemeFactory implements SchemeFactory { public get_role_grants_for_principal_argsStandardScheme getScheme() { return new get_role_grants_for_principal_argsStandardScheme(); } } private static class get_role_grants_for_principal_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new GetRoleGrantsForPrincipalRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_role_grants_for_principal_argsTupleSchemeFactory implements SchemeFactory { public get_role_grants_for_principal_argsTupleScheme getScheme() { return new get_role_grants_for_principal_argsTupleScheme(); } } private static class get_role_grants_for_principal_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new GetRoleGrantsForPrincipalRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_role_grants_for_principal_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_role_grants_for_principal_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_role_grants_for_principal_resultTupleSchemeFactory()); } private GetRoleGrantsForPrincipalResponse success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, GetRoleGrantsForPrincipalResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_result.class, metaDataMap); } public get_role_grants_for_principal_result() { } public get_role_grants_for_principal_result( GetRoleGrantsForPrincipalResponse success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_role_grants_for_principal_result(get_role_grants_for_principal_result other) { if (other.isSetSuccess()) { this.success = new GetRoleGrantsForPrincipalResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_role_grants_for_principal_result deepCopy() { return new get_role_grants_for_principal_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public GetRoleGrantsForPrincipalResponse getSuccess() { return this.success; } public void setSuccess(GetRoleGrantsForPrincipalResponse 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((GetRoleGrantsForPrincipalResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_role_grants_for_principal_result) return this.equals((get_role_grants_for_principal_result)that); return false; } public boolean equals(get_role_grants_for_principal_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_role_grants_for_principal_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_grants_for_principal_result typedOther = (get_role_grants_for_principal_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_role_grants_for_principal_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_role_grants_for_principal_resultStandardSchemeFactory implements SchemeFactory { public get_role_grants_for_principal_resultStandardScheme getScheme() { return new get_role_grants_for_principal_resultStandardScheme(); } } private static class get_role_grants_for_principal_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GetRoleGrantsForPrincipalResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_role_grants_for_principal_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_role_grants_for_principal_resultTupleSchemeFactory implements SchemeFactory { public get_role_grants_for_principal_resultTupleScheme getScheme() { return new get_role_grants_for_principal_resultTupleScheme(); } } private static class get_role_grants_for_principal_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetRoleGrantsForPrincipalResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_privilege_set_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_args"); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_privilege_set_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_privilege_set_argsTupleSchemeFactory()); } private HiveObjectRef hiveObject; // required private String user_name; // required private List group_names; // 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 { HIVE_OBJECT((short)1, "hiveObject"), USER_NAME((short)2, "user_name"), GROUP_NAMES((short)3, "group_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // HIVE_OBJECT return HIVE_OBJECT; case 2: // USER_NAME return USER_NAME; case 3: // GROUP_NAMES return GROUP_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap); } public get_privilege_set_args() { } public get_privilege_set_args( HiveObjectRef hiveObject, String user_name, List group_names) { this(); this.hiveObject = hiveObject; this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on other. */ public get_privilege_set_args(get_privilege_set_args other) { if (other.isSetHiveObject()) { this.hiveObject = new HiveObjectRef(other.hiveObject); } if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List __this__group_names = new ArrayList(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_privilege_set_args deepCopy() { return new get_privilege_set_args(this); } @Override public void clear() { this.hiveObject = null; this.user_name = null; this.group_names = null; } public HiveObjectRef getHiveObject() { return this.hiveObject; } public void setHiveObject(HiveObjectRef hiveObject) { this.hiveObject = hiveObject; } public void unsetHiveObject() { this.hiveObject = null; } /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ public boolean isSetHiveObject() { return this.hiveObject != null; } public void setHiveObjectIsSet(boolean value) { if (!value) { this.hiveObject = null; } } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator getGroup_namesIterator() { return (this.group_names == null) ? null : this.group_names.iterator(); } public void addToGroup_names(String elem) { if (this.group_names == null) { this.group_names = new ArrayList(); } this.group_names.add(elem); } public List getGroup_names() { return this.group_names; } public void setGroup_names(List group_names) { this.group_names = group_names; } public void unsetGroup_names() { this.group_names = null; } /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ public boolean isSetGroup_names() { return this.group_names != null; } public void setGroup_namesIsSet(boolean value) { if (!value) { this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case HIVE_OBJECT: if (value == null) { unsetHiveObject(); } else { setHiveObject((HiveObjectRef)value); } break; case USER_NAME: if (value == null) { unsetUser_name(); } else { setUser_name((String)value); } break; case GROUP_NAMES: if (value == null) { unsetGroup_names(); } else { setGroup_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case HIVE_OBJECT: return getHiveObject(); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 HIVE_OBJECT: return isSetHiveObject(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_privilege_set_args) return this.equals((get_privilege_set_args)that); return false; } public boolean equals(get_privilege_set_args that) { if (that == null) return false; boolean this_present_hiveObject = true && this.isSetHiveObject(); boolean that_present_hiveObject = true && that.isSetHiveObject(); if (this_present_hiveObject || that_present_hiveObject) { if (!(this_present_hiveObject && that_present_hiveObject)) return false; if (!this.hiveObject.equals(that.hiveObject)) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_hiveObject = true && (isSetHiveObject()); builder.append(present_hiveObject); if (present_hiveObject) builder.append(hiveObject); boolean present_user_name = true && (isSetUser_name()); builder.append(present_user_name); if (present_user_name) builder.append(user_name); boolean present_group_names = true && (isSetGroup_names()); builder.append(present_group_names); if (present_group_names) builder.append(group_names); return builder.toHashCode(); } public int compareTo(get_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_privilege_set_args typedOther = (get_privilege_set_args)other; lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_privilege_set_args("); boolean first = true; sb.append("hiveObject:"); if (this.hiveObject == null) { sb.append("null"); } else { sb.append(this.hiveObject); } first = false; if (!first) sb.append(", "); sb.append("user_name:"); if (this.user_name == null) { sb.append("null"); } else { sb.append(this.user_name); } first = false; if (!first) sb.append(", "); sb.append("group_names:"); if (this.group_names == null) { sb.append("null"); } else { sb.append(this.group_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (hiveObject != null) { hiveObject.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_privilege_set_argsStandardSchemeFactory implements SchemeFactory { public get_privilege_set_argsStandardScheme getScheme() { return new get_privilege_set_argsStandardScheme(); } } private static class get_privilege_set_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // HIVE_OBJECT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.hiveObject = new HiveObjectRef(); struct.hiveObject.read(iprot); struct.setHiveObjectIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list934 = iprot.readListBegin(); struct.group_names = new ArrayList(_list934.size); for (int _i935 = 0; _i935 < _list934.size; ++_i935) { String _elem936; // optional _elem936 = iprot.readString(); struct.group_names.add(_elem936); } iprot.readListEnd(); } struct.setGroup_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.hiveObject != null) { oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); struct.hiveObject.write(oprot); oprot.writeFieldEnd(); } if (struct.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.user_name); oprot.writeFieldEnd(); } if (struct.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); for (String _iter937 : struct.group_names) { oprot.writeString(_iter937); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_privilege_set_argsTupleSchemeFactory implements SchemeFactory { public get_privilege_set_argsTupleScheme getScheme() { return new get_privilege_set_argsTupleScheme(); } } private static class get_privilege_set_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetHiveObject()) { optionals.set(0); } if (struct.isSetUser_name()) { optionals.set(1); } if (struct.isSetGroup_names()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetHiveObject()) { struct.hiveObject.write(oprot); } if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter938 : struct.group_names) { oprot.writeString(_iter938); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.hiveObject = new HiveObjectRef(); struct.hiveObject.read(iprot); struct.setHiveObjectIsSet(true); } if (incoming.get(1)) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list939 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList(_list939.size); for (int _i940 = 0; _i940 < _list939.size; ++_i940) { String _elem941; // optional _elem941 = iprot.readString(); struct.group_names.add(_elem941); } } struct.setGroup_namesIsSet(true); } } } } public static class get_privilege_set_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_privilege_set_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_privilege_set_resultTupleSchemeFactory()); } private PrincipalPrivilegeSet success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, PrincipalPrivilegeSet.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_result.class, metaDataMap); } public get_privilege_set_result() { } public get_privilege_set_result( PrincipalPrivilegeSet success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_privilege_set_result(get_privilege_set_result other) { if (other.isSetSuccess()) { this.success = new PrincipalPrivilegeSet(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_privilege_set_result deepCopy() { return new get_privilege_set_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public PrincipalPrivilegeSet getSuccess() { return this.success; } public void setSuccess(PrincipalPrivilegeSet 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((PrincipalPrivilegeSet)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_privilege_set_result) return this.equals((get_privilege_set_result)that); return false; } public boolean equals(get_privilege_set_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_privilege_set_result typedOther = (get_privilege_set_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_privilege_set_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_privilege_set_resultStandardSchemeFactory implements SchemeFactory { public get_privilege_set_resultStandardScheme getScheme() { return new get_privilege_set_resultStandardScheme(); } } private static class get_privilege_set_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_privilege_set_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new PrincipalPrivilegeSet(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_privilege_set_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_privilege_set_resultTupleSchemeFactory implements SchemeFactory { public get_privilege_set_resultTupleScheme getScheme() { return new get_privilege_set_resultTupleScheme(); } } private static class get_privilege_set_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_privilege_set_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new PrincipalPrivilegeSet(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class list_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_args"); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_privileges_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_privileges_argsTupleSchemeFactory()); } private String principal_name; // required private PrincipalType principal_type; // required private HiveObjectRef hiveObject; // 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 { PRINCIPAL_NAME((short)1, "principal_name"), /** * * @see PrincipalType */ PRINCIPAL_TYPE((short)2, "principal_type"), HIVE_OBJECT((short)3, "hiveObject"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PRINCIPAL_NAME return PRINCIPAL_NAME; case 2: // PRINCIPAL_TYPE return PRINCIPAL_TYPE; case 3: // HIVE_OBJECT return HIVE_OBJECT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_args.class, metaDataMap); } public list_privileges_args() { } public list_privileges_args( String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) { this(); this.principal_name = principal_name; this.principal_type = principal_type; this.hiveObject = hiveObject; } /** * Performs a deep copy on other. */ public list_privileges_args(list_privileges_args other) { if (other.isSetPrincipal_name()) { this.principal_name = other.principal_name; } if (other.isSetPrincipal_type()) { this.principal_type = other.principal_type; } if (other.isSetHiveObject()) { this.hiveObject = new HiveObjectRef(other.hiveObject); } } public list_privileges_args deepCopy() { return new list_privileges_args(this); } @Override public void clear() { this.principal_name = null; this.principal_type = null; this.hiveObject = null; } public String getPrincipal_name() { return this.principal_name; } public void setPrincipal_name(String principal_name) { this.principal_name = principal_name; } public void unsetPrincipal_name() { this.principal_name = null; } /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_name() { return this.principal_name != null; } public void setPrincipal_nameIsSet(boolean value) { if (!value) { this.principal_name = null; } } /** * * @see PrincipalType */ public PrincipalType getPrincipal_type() { return this.principal_type; } /** * * @see PrincipalType */ public void setPrincipal_type(PrincipalType principal_type) { this.principal_type = principal_type; } public void unsetPrincipal_type() { this.principal_type = null; } /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ public boolean isSetPrincipal_type() { return this.principal_type != null; } public void setPrincipal_typeIsSet(boolean value) { if (!value) { this.principal_type = null; } } public HiveObjectRef getHiveObject() { return this.hiveObject; } public void setHiveObject(HiveObjectRef hiveObject) { this.hiveObject = hiveObject; } public void unsetHiveObject() { this.hiveObject = null; } /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ public boolean isSetHiveObject() { return this.hiveObject != null; } public void setHiveObjectIsSet(boolean value) { if (!value) { this.hiveObject = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PRINCIPAL_NAME: if (value == null) { unsetPrincipal_name(); } else { setPrincipal_name((String)value); } break; case PRINCIPAL_TYPE: if (value == null) { unsetPrincipal_type(); } else { setPrincipal_type((PrincipalType)value); } break; case HIVE_OBJECT: if (value == null) { unsetHiveObject(); } else { setHiveObject((HiveObjectRef)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PRINCIPAL_NAME: return getPrincipal_name(); case PRINCIPAL_TYPE: return getPrincipal_type(); case HIVE_OBJECT: return getHiveObject(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PRINCIPAL_NAME: return isSetPrincipal_name(); case PRINCIPAL_TYPE: return isSetPrincipal_type(); case HIVE_OBJECT: return isSetHiveObject(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_privileges_args) return this.equals((list_privileges_args)that); return false; } public boolean equals(list_privileges_args that) { if (that == null) return false; boolean this_present_principal_name = true && this.isSetPrincipal_name(); boolean that_present_principal_name = true && that.isSetPrincipal_name(); if (this_present_principal_name || that_present_principal_name) { if (!(this_present_principal_name && that_present_principal_name)) return false; if (!this.principal_name.equals(that.principal_name)) return false; } boolean this_present_principal_type = true && this.isSetPrincipal_type(); boolean that_present_principal_type = true && that.isSetPrincipal_type(); if (this_present_principal_type || that_present_principal_type) { if (!(this_present_principal_type && that_present_principal_type)) return false; if (!this.principal_type.equals(that.principal_type)) return false; } boolean this_present_hiveObject = true && this.isSetHiveObject(); boolean that_present_hiveObject = true && that.isSetHiveObject(); if (this_present_hiveObject || that_present_hiveObject) { if (!(this_present_hiveObject && that_present_hiveObject)) return false; if (!this.hiveObject.equals(that.hiveObject)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_principal_name = true && (isSetPrincipal_name()); builder.append(present_principal_name); if (present_principal_name) builder.append(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); builder.append(present_principal_type); if (present_principal_type) builder.append(principal_type.getValue()); boolean present_hiveObject = true && (isSetHiveObject()); builder.append(present_hiveObject); if (present_hiveObject) builder.append(hiveObject); return builder.toHashCode(); } public int compareTo(list_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_privileges_args typedOther = (list_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_privileges_args("); boolean first = true; sb.append("principal_name:"); if (this.principal_name == null) { sb.append("null"); } else { sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); sb.append("principal_type:"); if (this.principal_type == null) { sb.append("null"); } else { sb.append(this.principal_type); } first = false; if (!first) sb.append(", "); sb.append("hiveObject:"); if (this.hiveObject == null) { sb.append("null"); } else { sb.append(this.hiveObject); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (hiveObject != null) { hiveObject.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class list_privileges_argsStandardSchemeFactory implements SchemeFactory { public list_privileges_argsStandardScheme getScheme() { return new list_privileges_argsStandardScheme(); } } private static class list_privileges_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PRINCIPAL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PRINCIPAL_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // HIVE_OBJECT if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.hiveObject = new HiveObjectRef(); struct.hiveObject.read(iprot); struct.setHiveObjectIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(struct.principal_name); oprot.writeFieldEnd(); } if (struct.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(struct.principal_type.getValue()); oprot.writeFieldEnd(); } if (struct.hiveObject != null) { oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); struct.hiveObject.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class list_privileges_argsTupleSchemeFactory implements SchemeFactory { public list_privileges_argsTupleScheme getScheme() { return new list_privileges_argsTupleScheme(); } } private static class list_privileges_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrincipal_name()) { optionals.set(0); } if (struct.isSetPrincipal_type()) { optionals.set(1); } if (struct.isSetHiveObject()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetPrincipal_name()) { oprot.writeString(struct.principal_name); } if (struct.isSetPrincipal_type()) { oprot.writeI32(struct.principal_type.getValue()); } if (struct.isSetHiveObject()) { struct.hiveObject.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.principal_name = iprot.readString(); struct.setPrincipal_nameIsSet(true); } if (incoming.get(1)) { struct.principal_type = PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } if (incoming.get(2)) { struct.hiveObject = new HiveObjectRef(); struct.hiveObject.read(iprot); struct.setHiveObjectIsSet(true); } } } } public static class list_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, HiveObjectPrivilege.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(list_privileges_result.class, metaDataMap); } public list_privileges_result() { } public list_privileges_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public list_privileges_result(list_privileges_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (HiveObjectPrivilege other_element : other.success) { __this__success.add(new HiveObjectPrivilege(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public list_privileges_result deepCopy() { return new list_privileges_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(HiveObjectPrivilege elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_privileges_result) return this.equals((list_privileges_result)that); return false; } public boolean equals(list_privileges_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(list_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_privileges_result typedOther = (list_privileges_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_privileges_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class list_privileges_resultStandardSchemeFactory implements SchemeFactory { public list_privileges_resultStandardScheme getScheme() { return new list_privileges_resultStandardScheme(); } } private static class list_privileges_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, list_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list942 = iprot.readListBegin(); struct.success = new ArrayList(_list942.size); for (int _i943 = 0; _i943 < _list942.size; ++_i943) { HiveObjectPrivilege _elem944; // optional _elem944 = new HiveObjectPrivilege(); _elem944.read(iprot); struct.success.add(_elem944); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, list_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (HiveObjectPrivilege _iter945 : struct.success) { _iter945.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class list_privileges_resultTupleSchemeFactory implements SchemeFactory { public list_privileges_resultTupleScheme getScheme() { return new list_privileges_resultTupleScheme(); } } private static class list_privileges_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (HiveObjectPrivilege _iter946 : struct.success) { _iter946.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, list_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list947 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list947.size); for (int _i948 = 0; _i948 < _list947.size; ++_i948) { HiveObjectPrivilege _elem949; // optional _elem949 = new HiveObjectPrivilege(); _elem949.read(iprot); struct.success.add(_elem949); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class grant_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_privileges_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_privileges_argsTupleSchemeFactory()); } private PrivilegeBag privileges; // 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 { PRIVILEGES((short)1, "privileges"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PRIVILEGES return PRIVILEGES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); } public grant_privileges_args() { } public grant_privileges_args( PrivilegeBag privileges) { this(); this.privileges = privileges; } /** * Performs a deep copy on other. */ public grant_privileges_args(grant_privileges_args other) { if (other.isSetPrivileges()) { this.privileges = new PrivilegeBag(other.privileges); } } public grant_privileges_args deepCopy() { return new grant_privileges_args(this); } @Override public void clear() { this.privileges = null; } public PrivilegeBag getPrivileges() { return this.privileges; } public void setPrivileges(PrivilegeBag privileges) { this.privileges = privileges; } public void unsetPrivileges() { this.privileges = null; } /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ public boolean isSetPrivileges() { return this.privileges != null; } public void setPrivilegesIsSet(boolean value) { if (!value) { this.privileges = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PRIVILEGES: if (value == null) { unsetPrivileges(); } else { setPrivileges((PrivilegeBag)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PRIVILEGES: return getPrivileges(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PRIVILEGES: return isSetPrivileges(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_privileges_args) return this.equals((grant_privileges_args)that); return false; } public boolean equals(grant_privileges_args that) { if (that == null) return false; boolean this_present_privileges = true && this.isSetPrivileges(); boolean that_present_privileges = true && that.isSetPrivileges(); if (this_present_privileges || that_present_privileges) { if (!(this_present_privileges && that_present_privileges)) return false; if (!this.privileges.equals(that.privileges)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_privileges = true && (isSetPrivileges()); builder.append(present_privileges); if (present_privileges) builder.append(privileges); return builder.toHashCode(); } public int compareTo(grant_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_privileges_args typedOther = (grant_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_privileges_args("); boolean first = true; sb.append("privileges:"); if (this.privileges == null) { sb.append("null"); } else { sb.append(this.privileges); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (privileges != null) { privileges.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_privileges_argsStandardSchemeFactory implements SchemeFactory { public grant_privileges_argsStandardScheme getScheme() { return new grant_privileges_argsStandardScheme(); } } private static class grant_privileges_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.privileges = new PrivilegeBag(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.privileges != null) { oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); struct.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_privileges_argsTupleSchemeFactory implements SchemeFactory { public grant_privileges_argsTupleScheme getScheme() { return new grant_privileges_argsTupleScheme(); } } private static class grant_privileges_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrivileges()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPrivileges()) { struct.privileges.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.privileges = new PrivilegeBag(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true); } } } } public static class grant_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_privileges_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_privileges_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(grant_privileges_result.class, metaDataMap); } public grant_privileges_result() { } public grant_privileges_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public grant_privileges_result(grant_privileges_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public grant_privileges_result deepCopy() { return new grant_privileges_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_privileges_result) return this.equals((grant_privileges_result)that); return false; } public boolean equals(grant_privileges_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_privileges_result typedOther = (grant_privileges_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_privileges_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_privileges_resultStandardSchemeFactory implements SchemeFactory { public grant_privileges_resultStandardScheme getScheme() { return new grant_privileges_resultStandardScheme(); } } private static class grant_privileges_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_privileges_resultTupleSchemeFactory implements SchemeFactory { public grant_privileges_resultTupleScheme getScheme() { return new grant_privileges_resultTupleScheme(); } } private static class grant_privileges_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revoke_privileges_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new revoke_privileges_argsTupleSchemeFactory()); } private PrivilegeBag privileges; // 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 { PRIVILEGES((short)1, "privileges"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // PRIVILEGES return PRIVILEGES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); } public revoke_privileges_args() { } public revoke_privileges_args( PrivilegeBag privileges) { this(); this.privileges = privileges; } /** * Performs a deep copy on other. */ public revoke_privileges_args(revoke_privileges_args other) { if (other.isSetPrivileges()) { this.privileges = new PrivilegeBag(other.privileges); } } public revoke_privileges_args deepCopy() { return new revoke_privileges_args(this); } @Override public void clear() { this.privileges = null; } public PrivilegeBag getPrivileges() { return this.privileges; } public void setPrivileges(PrivilegeBag privileges) { this.privileges = privileges; } public void unsetPrivileges() { this.privileges = null; } /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ public boolean isSetPrivileges() { return this.privileges != null; } public void setPrivilegesIsSet(boolean value) { if (!value) { this.privileges = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PRIVILEGES: if (value == null) { unsetPrivileges(); } else { setPrivileges((PrivilegeBag)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PRIVILEGES: return getPrivileges(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 PRIVILEGES: return isSetPrivileges(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_privileges_args) return this.equals((revoke_privileges_args)that); return false; } public boolean equals(revoke_privileges_args that) { if (that == null) return false; boolean this_present_privileges = true && this.isSetPrivileges(); boolean that_present_privileges = true && that.isSetPrivileges(); if (this_present_privileges || that_present_privileges) { if (!(this_present_privileges && that_present_privileges)) return false; if (!this.privileges.equals(that.privileges)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_privileges = true && (isSetPrivileges()); builder.append(present_privileges); if (present_privileges) builder.append(privileges); return builder.toHashCode(); } public int compareTo(revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_privileges_args typedOther = (revoke_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revoke_privileges_args("); boolean first = true; sb.append("privileges:"); if (this.privileges == null) { sb.append("null"); } else { sb.append(this.privileges); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (privileges != null) { privileges.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { public revoke_privileges_argsStandardScheme getScheme() { return new revoke_privileges_argsStandardScheme(); } } private static class revoke_privileges_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.privileges = new PrivilegeBag(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.privileges != null) { oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); struct.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { public revoke_privileges_argsTupleScheme getScheme() { return new revoke_privileges_argsTupleScheme(); } } private static class revoke_privileges_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPrivileges()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetPrivileges()) { struct.privileges.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.privileges = new PrivilegeBag(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true); } } } } public static class revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new revoke_privileges_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new revoke_privileges_resultTupleSchemeFactory()); } private boolean success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(revoke_privileges_result.class, metaDataMap); } public revoke_privileges_result() { } public revoke_privileges_result( boolean success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public revoke_privileges_result(revoke_privileges_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public revoke_privileges_result deepCopy() { return new revoke_privileges_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.o1 = null; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_privileges_result) return this.equals((revoke_privileges_result)that); return false; } public boolean equals(revoke_privileges_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_privileges_result typedOther = (revoke_privileges_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("revoke_privileges_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { public revoke_privileges_resultStandardScheme getScheme() { return new revoke_privileges_resultStandardScheme(); } } private static class revoke_privileges_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, revoke_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, revoke_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { public revoke_privileges_resultTupleScheme getScheme() { return new revoke_privileges_resultTupleScheme(); } } private static class revoke_privileges_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class grant_revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_args"); private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_revoke_privileges_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_revoke_privileges_argsTupleSchemeFactory()); } private GrantRevokePrivilegeRequest request; // 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 { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_args.class, metaDataMap); } public grant_revoke_privileges_args() { } public grant_revoke_privileges_args( GrantRevokePrivilegeRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public grant_revoke_privileges_args(grant_revoke_privileges_args other) { if (other.isSetRequest()) { this.request = new GrantRevokePrivilegeRequest(other.request); } } public grant_revoke_privileges_args deepCopy() { return new grant_revoke_privileges_args(this); } @Override public void clear() { this.request = null; } public GrantRevokePrivilegeRequest getRequest() { return this.request; } public void setRequest(GrantRevokePrivilegeRequest request) { this.request = request; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((GrantRevokePrivilegeRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_revoke_privileges_args) return this.equals((grant_revoke_privileges_args)that); return false; } public boolean equals(grant_revoke_privileges_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_request = true && (isSetRequest()); builder.append(present_request); if (present_request) builder.append(request); return builder.toHashCode(); } public int compareTo(grant_revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_revoke_privileges_args typedOther = (grant_revoke_privileges_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_revoke_privileges_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (request != null) { request.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { public grant_revoke_privileges_argsStandardScheme getScheme() { return new grant_revoke_privileges_argsStandardScheme(); } } private static class grant_revoke_privileges_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new GrantRevokePrivilegeRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { public grant_revoke_privileges_argsTupleScheme getScheme() { return new grant_revoke_privileges_argsTupleScheme(); } } private static class grant_revoke_privileges_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new GrantRevokePrivilegeRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class grant_revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new grant_revoke_privileges_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new grant_revoke_privileges_resultTupleSchemeFactory()); } private GrantRevokePrivilegeResponse success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, GrantRevokePrivilegeResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(grant_revoke_privileges_result.class, metaDataMap); } public grant_revoke_privileges_result() { } public grant_revoke_privileges_result( GrantRevokePrivilegeResponse success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public grant_revoke_privileges_result(grant_revoke_privileges_result other) { if (other.isSetSuccess()) { this.success = new GrantRevokePrivilegeResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public grant_revoke_privileges_result deepCopy() { return new grant_revoke_privileges_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public GrantRevokePrivilegeResponse getSuccess() { return this.success; } public void setSuccess(GrantRevokePrivilegeResponse 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((GrantRevokePrivilegeResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_revoke_privileges_result) return this.equals((grant_revoke_privileges_result)that); return false; } public boolean equals(grant_revoke_privileges_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(grant_revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_revoke_privileges_result typedOther = (grant_revoke_privileges_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("grant_revoke_privileges_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class grant_revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { public grant_revoke_privileges_resultStandardScheme getScheme() { return new grant_revoke_privileges_resultStandardScheme(); } } private static class grant_revoke_privileges_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GrantRevokePrivilegeResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class grant_revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { public grant_revoke_privileges_resultTupleScheme getScheme() { return new grant_revoke_privileges_resultTupleScheme(); } } private static class grant_revoke_privileges_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GrantRevokePrivilegeResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class set_ugi_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_args"); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_ugi_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_ugi_argsTupleSchemeFactory()); } private String user_name; // required private List group_names; // 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_NAME((short)1, "user_name"), GROUP_NAMES((short)2, "group_names"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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_NAME return USER_NAME; case 2: // GROUP_NAMES return GROUP_NAMES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", 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(set_ugi_args.class, metaDataMap); } public set_ugi_args() { } public set_ugi_args( String user_name, List group_names) { this(); this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on other. */ public set_ugi_args(set_ugi_args other) { if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List __this__group_names = new ArrayList(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public set_ugi_args deepCopy() { return new set_ugi_args(this); } @Override public void clear() { this.user_name = null; this.group_names = null; } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator getGroup_namesIterator() { return (this.group_names == null) ? null : this.group_names.iterator(); } public void addToGroup_names(String elem) { if (this.group_names == null) { this.group_names = new ArrayList(); } this.group_names.add(elem); } public List getGroup_names() { return this.group_names; } public void setGroup_names(List group_names) { this.group_names = group_names; } public void unsetGroup_names() { this.group_names = null; } /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ public boolean isSetGroup_names() { return this.group_names != null; } public void setGroup_namesIsSet(boolean value) { if (!value) { this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_NAME: if (value == null) { unsetUser_name(); } else { setUser_name((String)value); } break; case GROUP_NAMES: if (value == null) { unsetGroup_names(); } else { setGroup_names((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof set_ugi_args) return this.equals((set_ugi_args)that); return false; } public boolean equals(set_ugi_args that) { if (that == null) return false; boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_user_name = true && (isSetUser_name()); builder.append(present_user_name); if (present_user_name) builder.append(user_name); boolean present_group_names = true && (isSetGroup_names()); builder.append(present_group_names); if (present_group_names) builder.append(group_names); return builder.toHashCode(); } public int compareTo(set_ugi_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_ugi_args typedOther = (set_ugi_args)other; lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_ugi_args("); boolean first = true; sb.append("user_name:"); if (this.user_name == null) { sb.append("null"); } else { sb.append(this.user_name); } first = false; if (!first) sb.append(", "); sb.append("group_names:"); if (this.group_names == null) { sb.append("null"); } else { sb.append(this.group_names); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_ugi_argsStandardSchemeFactory implements SchemeFactory { public set_ugi_argsStandardScheme getScheme() { return new set_ugi_argsStandardScheme(); } } private static class set_ugi_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GROUP_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list950 = iprot.readListBegin(); struct.group_names = new ArrayList(_list950.size); for (int _i951 = 0; _i951 < _list950.size; ++_i951) { String _elem952; // optional _elem952 = iprot.readString(); struct.group_names.add(_elem952); } iprot.readListEnd(); } struct.setGroup_namesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(struct.user_name); oprot.writeFieldEnd(); } if (struct.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.group_names.size())); for (String _iter953 : struct.group_names) { oprot.writeString(_iter953); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_ugi_argsTupleSchemeFactory implements SchemeFactory { public set_ugi_argsTupleScheme getScheme() { return new set_ugi_argsTupleScheme(); } } private static class set_ugi_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUser_name()) { optionals.set(0); } if (struct.isSetGroup_names()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter954 : struct.group_names) { oprot.writeString(_iter954); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.user_name = iprot.readString(); struct.setUser_nameIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list955 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList(_list955.size); for (int _i956 = 0; _i956 < _list955.size; ++_i956) { String _elem957; // optional _elem957 = iprot.readString(); struct.group_names.add(_elem957); } } struct.setGroup_namesIsSet(true); } } } } public static class set_ugi_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_ugi_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_ugi_resultTupleSchemeFactory()); } private List success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(set_ugi_result.class, metaDataMap); } public set_ugi_result() { } public set_ugi_result( List success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public set_ugi_result(set_ugi_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public set_ugi_result deepCopy() { return new set_ugi_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public void setSuccess(List 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof set_ugi_result) return this.equals((set_ugi_result)that); return false; } public boolean equals(set_ugi_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(set_ugi_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_ugi_result typedOther = (set_ugi_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_ugi_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_ugi_resultStandardSchemeFactory implements SchemeFactory { public set_ugi_resultStandardScheme getScheme() { return new set_ugi_resultStandardScheme(); } } private static class set_ugi_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, set_ugi_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list958 = iprot.readListBegin(); struct.success = new ArrayList(_list958.size); for (int _i959 = 0; _i959 < _list958.size; ++_i959) { String _elem960; // optional _elem960 = iprot.readString(); struct.success.add(_elem960); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_ugi_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (String _iter961 : struct.success) { oprot.writeString(_iter961); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_ugi_resultTupleSchemeFactory implements SchemeFactory { public set_ugi_resultTupleScheme getScheme() { return new set_ugi_resultTupleScheme(); } } private static class set_ugi_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter962 : struct.success) { oprot.writeString(_iter962); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_ugi_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list963 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList(_list963.size); for (int _i964 = 0; _i964 < _list963.size; ++_i964) { String _elem965; // optional _elem965 = iprot.readString(); struct.success.add(_elem965); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_owner", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("renewer_kerberos_principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_delegation_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_delegation_token_argsTupleSchemeFactory()); } private String token_owner; // required private String renewer_kerberos_principal_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 { TOKEN_OWNER((short)1, "token_owner"), RENEWER_KERBEROS_PRINCIPAL_NAME((short)2, "renewer_kerberos_principal_name"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_OWNER return TOKEN_OWNER; case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME return RENEWER_KERBEROS_PRINCIPAL_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.TOKEN_OWNER, new org.apache.thrift.meta_data.FieldMetaData("token_owner", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RENEWER_KERBEROS_PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("renewer_kerberos_principal_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(get_delegation_token_args.class, metaDataMap); } public get_delegation_token_args() { } public get_delegation_token_args( String token_owner, String renewer_kerberos_principal_name) { this(); this.token_owner = token_owner; this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; } /** * Performs a deep copy on other. */ public get_delegation_token_args(get_delegation_token_args other) { if (other.isSetToken_owner()) { this.token_owner = other.token_owner; } if (other.isSetRenewer_kerberos_principal_name()) { this.renewer_kerberos_principal_name = other.renewer_kerberos_principal_name; } } public get_delegation_token_args deepCopy() { return new get_delegation_token_args(this); } @Override public void clear() { this.token_owner = null; this.renewer_kerberos_principal_name = null; } public String getToken_owner() { return this.token_owner; } public void setToken_owner(String token_owner) { this.token_owner = token_owner; } public void unsetToken_owner() { this.token_owner = null; } /** Returns true if field token_owner is set (has been assigned a value) and false otherwise */ public boolean isSetToken_owner() { return this.token_owner != null; } public void setToken_ownerIsSet(boolean value) { if (!value) { this.token_owner = null; } } public String getRenewer_kerberos_principal_name() { return this.renewer_kerberos_principal_name; } public void setRenewer_kerberos_principal_name(String renewer_kerberos_principal_name) { this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; } public void unsetRenewer_kerberos_principal_name() { this.renewer_kerberos_principal_name = null; } /** Returns true if field renewer_kerberos_principal_name is set (has been assigned a value) and false otherwise */ public boolean isSetRenewer_kerberos_principal_name() { return this.renewer_kerberos_principal_name != null; } public void setRenewer_kerberos_principal_nameIsSet(boolean value) { if (!value) { this.renewer_kerberos_principal_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_OWNER: if (value == null) { unsetToken_owner(); } else { setToken_owner((String)value); } break; case RENEWER_KERBEROS_PRINCIPAL_NAME: if (value == null) { unsetRenewer_kerberos_principal_name(); } else { setRenewer_kerberos_principal_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_OWNER: return getToken_owner(); case RENEWER_KERBEROS_PRINCIPAL_NAME: return getRenewer_kerberos_principal_name(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TOKEN_OWNER: return isSetToken_owner(); case RENEWER_KERBEROS_PRINCIPAL_NAME: return isSetRenewer_kerberos_principal_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_delegation_token_args) return this.equals((get_delegation_token_args)that); return false; } public boolean equals(get_delegation_token_args that) { if (that == null) return false; boolean this_present_token_owner = true && this.isSetToken_owner(); boolean that_present_token_owner = true && that.isSetToken_owner(); if (this_present_token_owner || that_present_token_owner) { if (!(this_present_token_owner && that_present_token_owner)) return false; if (!this.token_owner.equals(that.token_owner)) return false; } boolean this_present_renewer_kerberos_principal_name = true && this.isSetRenewer_kerberos_principal_name(); boolean that_present_renewer_kerberos_principal_name = true && that.isSetRenewer_kerberos_principal_name(); if (this_present_renewer_kerberos_principal_name || that_present_renewer_kerberos_principal_name) { if (!(this_present_renewer_kerberos_principal_name && that_present_renewer_kerberos_principal_name)) return false; if (!this.renewer_kerberos_principal_name.equals(that.renewer_kerberos_principal_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_token_owner = true && (isSetToken_owner()); builder.append(present_token_owner); if (present_token_owner) builder.append(token_owner); boolean present_renewer_kerberos_principal_name = true && (isSetRenewer_kerberos_principal_name()); builder.append(present_renewer_kerberos_principal_name); if (present_renewer_kerberos_principal_name) builder.append(renewer_kerberos_principal_name); return builder.toHashCode(); } public int compareTo(get_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_delegation_token_args typedOther = (get_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_owner()).compareTo(typedOther.isSetToken_owner()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_owner()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_owner, typedOther.token_owner); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRenewer_kerberos_principal_name()).compareTo(typedOther.isSetRenewer_kerberos_principal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRenewer_kerberos_principal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer_kerberos_principal_name, typedOther.renewer_kerberos_principal_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_delegation_token_args("); boolean first = true; sb.append("token_owner:"); if (this.token_owner == null) { sb.append("null"); } else { sb.append(this.token_owner); } first = false; if (!first) sb.append(", "); sb.append("renewer_kerberos_principal_name:"); if (this.renewer_kerberos_principal_name == null) { sb.append("null"); } else { sb.append(this.renewer_kerberos_principal_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_delegation_token_argsStandardSchemeFactory implements SchemeFactory { public get_delegation_token_argsStandardScheme getScheme() { return new get_delegation_token_argsStandardScheme(); } } private static class get_delegation_token_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN_OWNER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_owner = iprot.readString(); struct.setToken_ownerIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.renewer_kerberos_principal_name = iprot.readString(); struct.setRenewer_kerberos_principal_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_owner != null) { oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); oprot.writeString(struct.token_owner); oprot.writeFieldEnd(); } if (struct.renewer_kerberos_principal_name != null) { oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(struct.renewer_kerberos_principal_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_delegation_token_argsTupleSchemeFactory implements SchemeFactory { public get_delegation_token_argsTupleScheme getScheme() { return new get_delegation_token_argsTupleScheme(); } } private static class get_delegation_token_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_owner()) { optionals.set(0); } if (struct.isSetRenewer_kerberos_principal_name()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetToken_owner()) { oprot.writeString(struct.token_owner); } if (struct.isSetRenewer_kerberos_principal_name()) { oprot.writeString(struct.renewer_kerberos_principal_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.token_owner = iprot.readString(); struct.setToken_ownerIsSet(true); } if (incoming.get(1)) { struct.renewer_kerberos_principal_name = iprot.readString(); struct.setRenewer_kerberos_principal_nameIsSet(true); } } } } public static class get_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_delegation_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_delegation_token_resultTupleSchemeFactory()); } private String success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_delegation_token_result.class, metaDataMap); } public get_delegation_token_result() { } public get_delegation_token_result( String success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on other. */ public get_delegation_token_result(get_delegation_token_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_delegation_token_result deepCopy() { return new get_delegation_token_result(this); } @Override public void clear() { this.success = null; this.o1 = 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 MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_delegation_token_result) return this.equals((get_delegation_token_result)that); return false; } public boolean equals(get_delegation_token_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(get_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_delegation_token_result typedOther = (get_delegation_token_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_delegation_token_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_delegation_token_resultStandardSchemeFactory implements SchemeFactory { public get_delegation_token_resultStandardScheme getScheme() { return new get_delegation_token_resultStandardScheme(); } } private static class get_delegation_token_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_delegation_token_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_delegation_token_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_delegation_token_resultTupleSchemeFactory implements SchemeFactory { public get_delegation_token_resultTupleScheme getScheme() { return new get_delegation_token_resultTupleScheme(); } } private static class get_delegation_token_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class renew_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new renew_delegation_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new renew_delegation_token_argsTupleSchemeFactory()); } private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN_STR_FORM((short)1, "token_str_form"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_STR_FORM return TOKEN_STR_FORM; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", 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(renew_delegation_token_args.class, metaDataMap); } public renew_delegation_token_args() { } public renew_delegation_token_args( String token_str_form) { this(); this.token_str_form = token_str_form; } /** * Performs a deep copy on other. */ public renew_delegation_token_args(renew_delegation_token_args other) { if (other.isSetToken_str_form()) { this.token_str_form = other.token_str_form; } } public renew_delegation_token_args deepCopy() { return new renew_delegation_token_args(this); } @Override public void clear() { this.token_str_form = null; } public String getToken_str_form() { return this.token_str_form; } public void setToken_str_form(String token_str_form) { this.token_str_form = token_str_form; } public void unsetToken_str_form() { this.token_str_form = null; } /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ public boolean isSetToken_str_form() { return this.token_str_form != null; } public void setToken_str_formIsSet(boolean value) { if (!value) { this.token_str_form = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_STR_FORM: if (value == null) { unsetToken_str_form(); } else { setToken_str_form((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_STR_FORM: return getToken_str_form(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TOKEN_STR_FORM: return isSetToken_str_form(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof renew_delegation_token_args) return this.equals((renew_delegation_token_args)that); return false; } public boolean equals(renew_delegation_token_args that) { if (that == null) return false; boolean this_present_token_str_form = true && this.isSetToken_str_form(); boolean that_present_token_str_form = true && that.isSetToken_str_form(); if (this_present_token_str_form || that_present_token_str_form) { if (!(this_present_token_str_form && that_present_token_str_form)) return false; if (!this.token_str_form.equals(that.token_str_form)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_token_str_form = true && (isSetToken_str_form()); builder.append(present_token_str_form); if (present_token_str_form) builder.append(token_str_form); return builder.toHashCode(); } public int compareTo(renew_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; renew_delegation_token_args typedOther = (renew_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(typedOther.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, typedOther.token_str_form); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("renew_delegation_token_args("); boolean first = true; sb.append("token_str_form:"); if (this.token_str_form == null) { sb.append("null"); } else { sb.append(this.token_str_form); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class renew_delegation_token_argsStandardSchemeFactory implements SchemeFactory { public renew_delegation_token_argsStandardScheme getScheme() { return new renew_delegation_token_argsStandardScheme(); } } private static class renew_delegation_token_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN_STR_FORM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_str_form = iprot.readString(); struct.setToken_str_formIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_str_form != null) { oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); oprot.writeString(struct.token_str_form); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class renew_delegation_token_argsTupleSchemeFactory implements SchemeFactory { public renew_delegation_token_argsTupleScheme getScheme() { return new renew_delegation_token_argsTupleScheme(); } } private static class renew_delegation_token_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_str_form()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken_str_form()) { oprot.writeString(struct.token_str_form); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token_str_form = iprot.readString(); struct.setToken_str_formIsSet(true); } } } } public static class renew_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new renew_delegation_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new renew_delegation_token_resultTupleSchemeFactory()); } private long success; // required private MetaException o1; // 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"), O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(renew_delegation_token_result.class, metaDataMap); } public renew_delegation_token_result() { } public renew_delegation_token_result( long success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ public renew_delegation_token_result(renew_delegation_token_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public renew_delegation_token_result deepCopy() { return new renew_delegation_token_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.o1 = null; } public long getSuccess() { return this.success; } public void setSuccess(long success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Long)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Long.valueOf(getSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof renew_delegation_token_result) return this.equals((renew_delegation_token_result)that); return false; } public boolean equals(renew_delegation_token_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(renew_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; renew_delegation_token_result typedOther = (renew_delegation_token_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("renew_delegation_token_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class renew_delegation_token_resultStandardSchemeFactory implements SchemeFactory { public renew_delegation_token_resultStandardScheme getScheme() { return new renew_delegation_token_resultStandardScheme(); } } private static class renew_delegation_token_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, renew_delegation_token_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI64(struct.success); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class renew_delegation_token_resultTupleSchemeFactory implements SchemeFactory { public renew_delegation_token_resultTupleScheme getScheme() { return new renew_delegation_token_resultTupleScheme(); } } private static class renew_delegation_token_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI64(struct.success); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, renew_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class cancel_delegation_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancel_delegation_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancel_delegation_token_argsTupleSchemeFactory()); } private String token_str_form; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN_STR_FORM((short)1, "token_str_form"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_STR_FORM return TOKEN_STR_FORM; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", 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(cancel_delegation_token_args.class, metaDataMap); } public cancel_delegation_token_args() { } public cancel_delegation_token_args( String token_str_form) { this(); this.token_str_form = token_str_form; } /** * Performs a deep copy on other. */ public cancel_delegation_token_args(cancel_delegation_token_args other) { if (other.isSetToken_str_form()) { this.token_str_form = other.token_str_form; } } public cancel_delegation_token_args deepCopy() { return new cancel_delegation_token_args(this); } @Override public void clear() { this.token_str_form = null; } public String getToken_str_form() { return this.token_str_form; } public void setToken_str_form(String token_str_form) { this.token_str_form = token_str_form; } public void unsetToken_str_form() { this.token_str_form = null; } /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ public boolean isSetToken_str_form() { return this.token_str_form != null; } public void setToken_str_formIsSet(boolean value) { if (!value) { this.token_str_form = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_STR_FORM: if (value == null) { unsetToken_str_form(); } else { setToken_str_form((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_STR_FORM: return getToken_str_form(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TOKEN_STR_FORM: return isSetToken_str_form(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof cancel_delegation_token_args) return this.equals((cancel_delegation_token_args)that); return false; } public boolean equals(cancel_delegation_token_args that) { if (that == null) return false; boolean this_present_token_str_form = true && this.isSetToken_str_form(); boolean that_present_token_str_form = true && that.isSetToken_str_form(); if (this_present_token_str_form || that_present_token_str_form) { if (!(this_present_token_str_form && that_present_token_str_form)) return false; if (!this.token_str_form.equals(that.token_str_form)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_token_str_form = true && (isSetToken_str_form()); builder.append(present_token_str_form); if (present_token_str_form) builder.append(token_str_form); return builder.toHashCode(); } public int compareTo(cancel_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancel_delegation_token_args typedOther = (cancel_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(typedOther.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, typedOther.token_str_form); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("cancel_delegation_token_args("); boolean first = true; sb.append("token_str_form:"); if (this.token_str_form == null) { sb.append("null"); } else { sb.append(this.token_str_form); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class cancel_delegation_token_argsStandardSchemeFactory implements SchemeFactory { public cancel_delegation_token_argsStandardScheme getScheme() { return new cancel_delegation_token_argsStandardScheme(); } } private static class cancel_delegation_token_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN_STR_FORM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_str_form = iprot.readString(); struct.setToken_str_formIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_str_form != null) { oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); oprot.writeString(struct.token_str_form); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancel_delegation_token_argsTupleSchemeFactory implements SchemeFactory { public cancel_delegation_token_argsTupleScheme getScheme() { return new cancel_delegation_token_argsTupleScheme(); } } private static class cancel_delegation_token_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_str_form()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken_str_form()) { oprot.writeString(struct.token_str_form); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token_str_form = iprot.readString(); struct.setToken_str_formIsSet(true); } } } } public static class cancel_delegation_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancel_delegation_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancel_delegation_token_resultTupleSchemeFactory()); } private MetaException o1; // 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 { O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(cancel_delegation_token_result.class, metaDataMap); } public cancel_delegation_token_result() { } public cancel_delegation_token_result( MetaException o1) { this(); this.o1 = o1; } /** * Performs a deep copy on other. */ public cancel_delegation_token_result(cancel_delegation_token_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public cancel_delegation_token_result deepCopy() { return new cancel_delegation_token_result(this); } @Override public void clear() { this.o1 = null; } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof cancel_delegation_token_result) return this.equals((cancel_delegation_token_result)that); return false; } public boolean equals(cancel_delegation_token_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(cancel_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancel_delegation_token_result typedOther = (cancel_delegation_token_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("cancel_delegation_token_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class cancel_delegation_token_resultStandardSchemeFactory implements SchemeFactory { public cancel_delegation_token_resultStandardScheme getScheme() { return new cancel_delegation_token_resultStandardScheme(); } } private static class cancel_delegation_token_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancel_delegation_token_resultTupleSchemeFactory implements SchemeFactory { public cancel_delegation_token_resultTupleScheme getScheme() { return new cancel_delegation_token_resultTupleScheme(); } } private static class cancel_delegation_token_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancel_delegation_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_open_txns_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_open_txns_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_open_txns_args.class, metaDataMap); } public get_open_txns_args() { } /** * Performs a deep copy on other. */ public get_open_txns_args(get_open_txns_args other) { } public get_open_txns_args deepCopy() { return new get_open_txns_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 get_open_txns_args) return this.equals((get_open_txns_args)that); return false; } public boolean equals(get_open_txns_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(get_open_txns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_open_txns_args typedOther = (get_open_txns_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_open_txns_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_open_txns_argsStandardSchemeFactory implements SchemeFactory { public get_open_txns_argsStandardScheme getScheme() { return new get_open_txns_argsStandardScheme(); } } private static class get_open_txns_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_open_txns_argsTupleSchemeFactory implements SchemeFactory { public get_open_txns_argsTupleScheme getScheme() { return new get_open_txns_argsTupleScheme(); } } private static class get_open_txns_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_open_txns_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_open_txns_resultTupleSchemeFactory()); } private GetOpenTxnsResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, GetOpenTxnsResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_result.class, metaDataMap); } public get_open_txns_result() { } public get_open_txns_result( GetOpenTxnsResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public get_open_txns_result(get_open_txns_result other) { if (other.isSetSuccess()) { this.success = new GetOpenTxnsResponse(other.success); } } public get_open_txns_result deepCopy() { return new get_open_txns_result(this); } @Override public void clear() { this.success = null; } public GetOpenTxnsResponse getSuccess() { return this.success; } public void setSuccess(GetOpenTxnsResponse 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((GetOpenTxnsResponse)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_open_txns_result) return this.equals((get_open_txns_result)that); return false; } public boolean equals(get_open_txns_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(get_open_txns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_open_txns_result typedOther = (get_open_txns_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_open_txns_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_open_txns_resultStandardSchemeFactory implements SchemeFactory { public get_open_txns_resultStandardScheme getScheme() { return new get_open_txns_resultStandardScheme(); } } private static class get_open_txns_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GetOpenTxnsResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_open_txns_resultTupleSchemeFactory implements SchemeFactory { public get_open_txns_resultTupleScheme getScheme() { return new get_open_txns_resultTupleScheme(); } } private static class get_open_txns_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new GetOpenTxnsResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class get_open_txns_info_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_open_txns_info_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_open_txns_info_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_open_txns_info_args.class, metaDataMap); } public get_open_txns_info_args() { } /** * Performs a deep copy on other. */ public get_open_txns_info_args(get_open_txns_info_args other) { } public get_open_txns_info_args deepCopy() { return new get_open_txns_info_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 get_open_txns_info_args) return this.equals((get_open_txns_info_args)that); return false; } public boolean equals(get_open_txns_info_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(get_open_txns_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_open_txns_info_args typedOther = (get_open_txns_info_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_open_txns_info_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_open_txns_info_argsStandardSchemeFactory implements SchemeFactory { public get_open_txns_info_argsStandardScheme getScheme() { return new get_open_txns_info_argsStandardScheme(); } } private static class get_open_txns_info_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_info_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_open_txns_info_argsTupleSchemeFactory implements SchemeFactory { public get_open_txns_info_argsTupleScheme getScheme() { return new get_open_txns_info_argsTupleScheme(); } } private static class get_open_txns_info_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_open_txns_info_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_open_txns_info_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_open_txns_info_resultTupleSchemeFactory()); } private GetOpenTxnsInfoResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, GetOpenTxnsInfoResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_result.class, metaDataMap); } public get_open_txns_info_result() { } public get_open_txns_info_result( GetOpenTxnsInfoResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public get_open_txns_info_result(get_open_txns_info_result other) { if (other.isSetSuccess()) { this.success = new GetOpenTxnsInfoResponse(other.success); } } public get_open_txns_info_result deepCopy() { return new get_open_txns_info_result(this); } @Override public void clear() { this.success = null; } public GetOpenTxnsInfoResponse getSuccess() { return this.success; } public void setSuccess(GetOpenTxnsInfoResponse 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((GetOpenTxnsInfoResponse)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_open_txns_info_result) return this.equals((get_open_txns_info_result)that); return false; } public boolean equals(get_open_txns_info_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(get_open_txns_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_open_txns_info_result typedOther = (get_open_txns_info_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_open_txns_info_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_open_txns_info_resultStandardSchemeFactory implements SchemeFactory { public get_open_txns_info_resultStandardScheme getScheme() { return new get_open_txns_info_resultStandardScheme(); } } private static class get_open_txns_info_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new GetOpenTxnsInfoResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_open_txns_info_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_open_txns_info_resultTupleSchemeFactory implements SchemeFactory { public get_open_txns_info_resultTupleScheme getScheme() { return new get_open_txns_info_resultTupleScheme(); } } private static class get_open_txns_info_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new GetOpenTxnsInfoResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new open_txns_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new open_txns_argsTupleSchemeFactory()); } private OpenTxnRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OpenTxnRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_args.class, metaDataMap); } public open_txns_args() { } public open_txns_args( OpenTxnRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public open_txns_args(open_txns_args other) { if (other.isSetRqst()) { this.rqst = new OpenTxnRequest(other.rqst); } } public open_txns_args deepCopy() { return new open_txns_args(this); } @Override public void clear() { this.rqst = null; } public OpenTxnRequest getRqst() { return this.rqst; } public void setRqst(OpenTxnRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((OpenTxnRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof open_txns_args) return this.equals((open_txns_args)that); return false; } public boolean equals(open_txns_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(open_txns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; open_txns_args typedOther = (open_txns_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("open_txns_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class open_txns_argsStandardSchemeFactory implements SchemeFactory { public open_txns_argsStandardScheme getScheme() { return new open_txns_argsStandardScheme(); } } private static class open_txns_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new OpenTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, open_txns_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class open_txns_argsTupleSchemeFactory implements SchemeFactory { public open_txns_argsTupleScheme getScheme() { return new open_txns_argsTupleScheme(); } } private static class open_txns_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new OpenTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new open_txns_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new open_txns_resultTupleSchemeFactory()); } private OpenTxnsResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, OpenTxnsResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_result.class, metaDataMap); } public open_txns_result() { } public open_txns_result( OpenTxnsResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public open_txns_result(open_txns_result other) { if (other.isSetSuccess()) { this.success = new OpenTxnsResponse(other.success); } } public open_txns_result deepCopy() { return new open_txns_result(this); } @Override public void clear() { this.success = null; } public OpenTxnsResponse getSuccess() { return this.success; } public void setSuccess(OpenTxnsResponse 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((OpenTxnsResponse)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 open_txns_result) return this.equals((open_txns_result)that); return false; } public boolean equals(open_txns_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(open_txns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; open_txns_result typedOther = (open_txns_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("open_txns_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class open_txns_resultStandardSchemeFactory implements SchemeFactory { public open_txns_resultStandardScheme getScheme() { return new open_txns_resultStandardScheme(); } } private static class open_txns_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new OpenTxnsResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, open_txns_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class open_txns_resultTupleSchemeFactory implements SchemeFactory { public open_txns_resultTupleScheme getScheme() { return new open_txns_resultTupleScheme(); } } private static class open_txns_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new OpenTxnsResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class abort_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_txn_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_txn_argsTupleSchemeFactory()); } private AbortTxnRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AbortTxnRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txn_args.class, metaDataMap); } public abort_txn_args() { } public abort_txn_args( AbortTxnRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public abort_txn_args(abort_txn_args other) { if (other.isSetRqst()) { this.rqst = new AbortTxnRequest(other.rqst); } } public abort_txn_args deepCopy() { return new abort_txn_args(this); } @Override public void clear() { this.rqst = null; } public AbortTxnRequest getRqst() { return this.rqst; } public void setRqst(AbortTxnRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((AbortTxnRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof abort_txn_args) return this.equals((abort_txn_args)that); return false; } public boolean equals(abort_txn_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(abort_txn_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; abort_txn_args typedOther = (abort_txn_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_txn_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class abort_txn_argsStandardSchemeFactory implements SchemeFactory { public abort_txn_argsStandardScheme getScheme() { return new abort_txn_argsStandardScheme(); } } private static class abort_txn_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new AbortTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_txn_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_txn_argsTupleSchemeFactory implements SchemeFactory { public abort_txn_argsTupleScheme getScheme() { return new abort_txn_argsTupleScheme(); } } private static class abort_txn_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new AbortTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class abort_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_txn_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_txn_resultTupleSchemeFactory()); } private NoSuchTxnException o1; // 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 { O1((short)1, "o1"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", 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(abort_txn_result.class, metaDataMap); } public abort_txn_result() { } public abort_txn_result( NoSuchTxnException o1) { this(); this.o1 = o1; } /** * Performs a deep copy on other. */ public abort_txn_result(abort_txn_result other) { if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } } public abort_txn_result deepCopy() { return new abort_txn_result(this); } @Override public void clear() { this.o1 = null; } public NoSuchTxnException getO1() { return this.o1; } public void setO1(NoSuchTxnException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchTxnException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof abort_txn_result) return this.equals((abort_txn_result)that); return false; } public boolean equals(abort_txn_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); return builder.toHashCode(); } public int compareTo(abort_txn_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; abort_txn_result typedOther = (abort_txn_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_txn_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class abort_txn_resultStandardSchemeFactory implements SchemeFactory { public abort_txn_resultStandardScheme getScheme() { return new abort_txn_resultStandardScheme(); } } private static class abort_txn_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_txn_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_txn_resultTupleSchemeFactory implements SchemeFactory { public abort_txn_resultTupleScheme getScheme() { return new abort_txn_resultTupleScheme(); } } private static class abort_txn_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_txn_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class commit_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new commit_txn_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new commit_txn_argsTupleSchemeFactory()); } private CommitTxnRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommitTxnRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_txn_args.class, metaDataMap); } public commit_txn_args() { } public commit_txn_args( CommitTxnRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public commit_txn_args(commit_txn_args other) { if (other.isSetRqst()) { this.rqst = new CommitTxnRequest(other.rqst); } } public commit_txn_args deepCopy() { return new commit_txn_args(this); } @Override public void clear() { this.rqst = null; } public CommitTxnRequest getRqst() { return this.rqst; } public void setRqst(CommitTxnRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((CommitTxnRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof commit_txn_args) return this.equals((commit_txn_args)that); return false; } public boolean equals(commit_txn_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(commit_txn_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; commit_txn_args typedOther = (commit_txn_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("commit_txn_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class commit_txn_argsStandardSchemeFactory implements SchemeFactory { public commit_txn_argsStandardScheme getScheme() { return new commit_txn_argsStandardScheme(); } } private static class commit_txn_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new CommitTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, commit_txn_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class commit_txn_argsTupleSchemeFactory implements SchemeFactory { public commit_txn_argsTupleScheme getScheme() { return new commit_txn_argsTupleScheme(); } } private static class commit_txn_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new CommitTxnRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class commit_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new commit_txn_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new commit_txn_resultTupleSchemeFactory()); } private NoSuchTxnException o1; // required private TxnAbortedException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(commit_txn_result.class, metaDataMap); } public commit_txn_result() { } public commit_txn_result( NoSuchTxnException o1, TxnAbortedException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public commit_txn_result(commit_txn_result other) { if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } if (other.isSetO2()) { this.o2 = new TxnAbortedException(other.o2); } } public commit_txn_result deepCopy() { return new commit_txn_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public NoSuchTxnException getO1() { return this.o1; } public void setO1(NoSuchTxnException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public TxnAbortedException getO2() { return this.o2; } public void setO2(TxnAbortedException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchTxnException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((TxnAbortedException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof commit_txn_result) return this.equals((commit_txn_result)that); return false; } public boolean equals(commit_txn_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(commit_txn_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; commit_txn_result typedOther = (commit_txn_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("commit_txn_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class commit_txn_resultStandardSchemeFactory implements SchemeFactory { public commit_txn_resultStandardScheme getScheme() { return new commit_txn_resultStandardScheme(); } } private static class commit_txn_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, commit_txn_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class commit_txn_resultTupleSchemeFactory implements SchemeFactory { public commit_txn_resultTupleScheme getScheme() { return new commit_txn_resultTupleScheme(); } } private static class commit_txn_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, commit_txn_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new lock_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new lock_argsTupleSchemeFactory()); } private LockRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lock_args.class, metaDataMap); } public lock_args() { } public lock_args( LockRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public lock_args(lock_args other) { if (other.isSetRqst()) { this.rqst = new LockRequest(other.rqst); } } public lock_args deepCopy() { return new lock_args(this); } @Override public void clear() { this.rqst = null; } public LockRequest getRqst() { return this.rqst; } public void setRqst(LockRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((LockRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof lock_args) return this.equals((lock_args)that); return false; } public boolean equals(lock_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(lock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lock_args typedOther = (lock_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("lock_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class lock_argsStandardSchemeFactory implements SchemeFactory { public lock_argsStandardScheme getScheme() { return new lock_argsStandardScheme(); } } private static class lock_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, lock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new LockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, lock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class lock_argsTupleSchemeFactory implements SchemeFactory { public lock_argsTupleScheme getScheme() { return new lock_argsTupleScheme(); } } private static class lock_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new LockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new lock_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new lock_resultTupleSchemeFactory()); } private LockResponse success; // required private NoSuchTxnException o1; // required private TxnAbortedException o2; // 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"), O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, LockResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(lock_result.class, metaDataMap); } public lock_result() { } public lock_result( LockResponse success, NoSuchTxnException o1, TxnAbortedException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public lock_result(lock_result other) { if (other.isSetSuccess()) { this.success = new LockResponse(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } if (other.isSetO2()) { this.o2 = new TxnAbortedException(other.o2); } } public lock_result deepCopy() { return new lock_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public LockResponse getSuccess() { return this.success; } public void setSuccess(LockResponse 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 NoSuchTxnException getO1() { return this.o1; } public void setO1(NoSuchTxnException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public TxnAbortedException getO2() { return this.o2; } public void setO2(TxnAbortedException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((LockResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchTxnException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((TxnAbortedException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof lock_result) return this.equals((lock_result)that); return false; } public boolean equals(lock_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(lock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lock_result typedOther = (lock_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("lock_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class lock_resultStandardSchemeFactory implements SchemeFactory { public lock_resultStandardScheme getScheme() { return new lock_resultStandardScheme(); } } private static class lock_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, lock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new LockResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, lock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class lock_resultTupleSchemeFactory implements SchemeFactory { public lock_resultTupleScheme getScheme() { return new lock_resultTupleScheme(); } } private static class lock_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, lock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, lock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new LockResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class check_lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new check_lock_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new check_lock_argsTupleSchemeFactory()); } private CheckLockRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CheckLockRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_lock_args.class, metaDataMap); } public check_lock_args() { } public check_lock_args( CheckLockRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public check_lock_args(check_lock_args other) { if (other.isSetRqst()) { this.rqst = new CheckLockRequest(other.rqst); } } public check_lock_args deepCopy() { return new check_lock_args(this); } @Override public void clear() { this.rqst = null; } public CheckLockRequest getRqst() { return this.rqst; } public void setRqst(CheckLockRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((CheckLockRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof check_lock_args) return this.equals((check_lock_args)that); return false; } public boolean equals(check_lock_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(check_lock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; check_lock_args typedOther = (check_lock_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("check_lock_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class check_lock_argsStandardSchemeFactory implements SchemeFactory { public check_lock_argsStandardScheme getScheme() { return new check_lock_argsStandardScheme(); } } private static class check_lock_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new CheckLockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, check_lock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class check_lock_argsTupleSchemeFactory implements SchemeFactory { public check_lock_argsTupleScheme getScheme() { return new check_lock_argsTupleScheme(); } } private static class check_lock_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new CheckLockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class check_lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_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 O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new check_lock_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new check_lock_resultTupleSchemeFactory()); } private LockResponse success; // required private NoSuchTxnException o1; // required private TxnAbortedException o2; // required private NoSuchLockException o3; // 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"), O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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, LockResponse.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(check_lock_result.class, metaDataMap); } public check_lock_result() { } public check_lock_result( LockResponse success, NoSuchTxnException o1, TxnAbortedException o2, NoSuchLockException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public check_lock_result(check_lock_result other) { if (other.isSetSuccess()) { this.success = new LockResponse(other.success); } if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } if (other.isSetO2()) { this.o2 = new TxnAbortedException(other.o2); } if (other.isSetO3()) { this.o3 = new NoSuchLockException(other.o3); } } public check_lock_result deepCopy() { return new check_lock_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public LockResponse getSuccess() { return this.success; } public void setSuccess(LockResponse 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 NoSuchTxnException getO1() { return this.o1; } public void setO1(NoSuchTxnException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public TxnAbortedException getO2() { return this.o2; } public void setO2(TxnAbortedException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public NoSuchLockException getO3() { return this.o3; } public void setO3(NoSuchLockException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((LockResponse)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchTxnException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((TxnAbortedException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((NoSuchLockException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof check_lock_result) return this.equals((check_lock_result)that); return false; } public boolean equals(check_lock_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_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(check_lock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; check_lock_result typedOther = (check_lock_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(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("check_lock_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("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class check_lock_resultStandardSchemeFactory implements SchemeFactory { public check_lock_resultStandardScheme getScheme() { return new check_lock_resultStandardScheme(); } } private static class check_lock_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new LockResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new NoSuchLockException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, check_lock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class check_lock_resultTupleSchemeFactory implements SchemeFactory { public check_lock_resultTupleScheme getScheme() { return new check_lock_resultTupleScheme(); } } private static class check_lock_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetO1()) { optionals.set(1); } if (struct.isSetO2()) { optionals.set(2); } if (struct.isSetO3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, check_lock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new LockResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(2)) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(3)) { struct.o3 = new NoSuchLockException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class unlock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unlock_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new unlock_argsTupleSchemeFactory()); } private UnlockRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnlockRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlock_args.class, metaDataMap); } public unlock_args() { } public unlock_args( UnlockRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public unlock_args(unlock_args other) { if (other.isSetRqst()) { this.rqst = new UnlockRequest(other.rqst); } } public unlock_args deepCopy() { return new unlock_args(this); } @Override public void clear() { this.rqst = null; } public UnlockRequest getRqst() { return this.rqst; } public void setRqst(UnlockRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((UnlockRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unlock_args) return this.equals((unlock_args)that); return false; } public boolean equals(unlock_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(unlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; unlock_args typedOther = (unlock_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unlock_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unlock_argsStandardSchemeFactory implements SchemeFactory { public unlock_argsStandardScheme getScheme() { return new unlock_argsStandardScheme(); } } private static class unlock_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new UnlockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unlock_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unlock_argsTupleSchemeFactory implements SchemeFactory { public unlock_argsTupleScheme getScheme() { return new unlock_argsTupleScheme(); } } private static class unlock_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new UnlockRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class unlock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new unlock_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new unlock_resultTupleSchemeFactory()); } private NoSuchLockException o1; // required private TxnOpenException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(unlock_result.class, metaDataMap); } public unlock_result() { } public unlock_result( NoSuchLockException o1, TxnOpenException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public unlock_result(unlock_result other) { if (other.isSetO1()) { this.o1 = new NoSuchLockException(other.o1); } if (other.isSetO2()) { this.o2 = new TxnOpenException(other.o2); } } public unlock_result deepCopy() { return new unlock_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public NoSuchLockException getO1() { return this.o1; } public void setO1(NoSuchLockException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public TxnOpenException getO2() { return this.o2; } public void setO2(TxnOpenException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchLockException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((TxnOpenException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof unlock_result) return this.equals((unlock_result)that); return false; } public boolean equals(unlock_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(unlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; unlock_result typedOther = (unlock_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("unlock_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class unlock_resultStandardSchemeFactory implements SchemeFactory { public unlock_resultStandardScheme getScheme() { return new unlock_resultStandardScheme(); } } private static class unlock_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchLockException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new TxnOpenException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, unlock_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class unlock_resultTupleSchemeFactory implements SchemeFactory { public unlock_resultTupleScheme getScheme() { return new unlock_resultTupleScheme(); } } private static class unlock_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, unlock_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, unlock_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchLockException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new TxnOpenException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class show_locks_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new show_locks_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new show_locks_argsTupleSchemeFactory()); } private ShowLocksRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_args.class, metaDataMap); } public show_locks_args() { } public show_locks_args( ShowLocksRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public show_locks_args(show_locks_args other) { if (other.isSetRqst()) { this.rqst = new ShowLocksRequest(other.rqst); } } public show_locks_args deepCopy() { return new show_locks_args(this); } @Override public void clear() { this.rqst = null; } public ShowLocksRequest getRqst() { return this.rqst; } public void setRqst(ShowLocksRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((ShowLocksRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof show_locks_args) return this.equals((show_locks_args)that); return false; } public boolean equals(show_locks_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(show_locks_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; show_locks_args typedOther = (show_locks_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("show_locks_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class show_locks_argsStandardSchemeFactory implements SchemeFactory { public show_locks_argsStandardScheme getScheme() { return new show_locks_argsStandardScheme(); } } private static class show_locks_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new ShowLocksRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, show_locks_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class show_locks_argsTupleSchemeFactory implements SchemeFactory { public show_locks_argsTupleScheme getScheme() { return new show_locks_argsTupleScheme(); } } private static class show_locks_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new ShowLocksRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class show_locks_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new show_locks_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new show_locks_resultTupleSchemeFactory()); } private ShowLocksResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, ShowLocksResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_result.class, metaDataMap); } public show_locks_result() { } public show_locks_result( ShowLocksResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public show_locks_result(show_locks_result other) { if (other.isSetSuccess()) { this.success = new ShowLocksResponse(other.success); } } public show_locks_result deepCopy() { return new show_locks_result(this); } @Override public void clear() { this.success = null; } public ShowLocksResponse getSuccess() { return this.success; } public void setSuccess(ShowLocksResponse 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((ShowLocksResponse)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 show_locks_result) return this.equals((show_locks_result)that); return false; } public boolean equals(show_locks_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(show_locks_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; show_locks_result typedOther = (show_locks_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("show_locks_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class show_locks_resultStandardSchemeFactory implements SchemeFactory { public show_locks_resultStandardScheme getScheme() { return new show_locks_resultStandardScheme(); } } private static class show_locks_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ShowLocksResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, show_locks_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class show_locks_resultTupleSchemeFactory implements SchemeFactory { public show_locks_resultTupleScheme getScheme() { return new show_locks_resultTupleScheme(); } } private static class show_locks_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new ShowLocksResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class heartbeat_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_args"); private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new heartbeat_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new heartbeat_argsTupleSchemeFactory()); } private HeartbeatRequest ids; // 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 { IDS((short)1, "ids"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // IDS return 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.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_args.class, metaDataMap); } public heartbeat_args() { } public heartbeat_args( HeartbeatRequest ids) { this(); this.ids = ids; } /** * Performs a deep copy on other. */ public heartbeat_args(heartbeat_args other) { if (other.isSetIds()) { this.ids = new HeartbeatRequest(other.ids); } } public heartbeat_args deepCopy() { return new heartbeat_args(this); } @Override public void clear() { this.ids = null; } public HeartbeatRequest getIds() { return this.ids; } public void setIds(HeartbeatRequest ids) { this.ids = ids; } public void unsetIds() { this.ids = null; } /** Returns true if field ids is set (has been assigned a value) and false otherwise */ public boolean isSetIds() { return this.ids != null; } public void setIdsIsSet(boolean value) { if (!value) { this.ids = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case IDS: if (value == null) { unsetIds(); } else { setIds((HeartbeatRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case IDS: return getIds(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 IDS: return isSetIds(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof heartbeat_args) return this.equals((heartbeat_args)that); return false; } public boolean equals(heartbeat_args that) { if (that == null) return false; boolean this_present_ids = true && this.isSetIds(); boolean that_present_ids = true && that.isSetIds(); if (this_present_ids || that_present_ids) { if (!(this_present_ids && that_present_ids)) return false; if (!this.ids.equals(that.ids)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_ids = true && (isSetIds()); builder.append(present_ids); if (present_ids) builder.append(ids); return builder.toHashCode(); } public int compareTo(heartbeat_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; heartbeat_args typedOther = (heartbeat_args)other; lastComparison = Boolean.valueOf(isSetIds()).compareTo(typedOther.isSetIds()); if (lastComparison != 0) { return lastComparison; } if (isSetIds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, typedOther.ids); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("heartbeat_args("); boolean first = true; sb.append("ids:"); if (this.ids == null) { sb.append("null"); } else { sb.append(this.ids); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (ids != null) { ids.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class heartbeat_argsStandardSchemeFactory implements SchemeFactory { public heartbeat_argsStandardScheme getScheme() { return new heartbeat_argsStandardScheme(); } } private static class heartbeat_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // IDS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ids = new HeartbeatRequest(); struct.ids.read(iprot); struct.setIdsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ids != null) { oprot.writeFieldBegin(IDS_FIELD_DESC); struct.ids.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class heartbeat_argsTupleSchemeFactory implements SchemeFactory { public heartbeat_argsTupleScheme getScheme() { return new heartbeat_argsTupleScheme(); } } private static class heartbeat_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetIds()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetIds()) { struct.ids.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ids = new HeartbeatRequest(); struct.ids.read(iprot); struct.setIdsIsSet(true); } } } } public static class heartbeat_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new heartbeat_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new heartbeat_resultTupleSchemeFactory()); } private NoSuchLockException o1; // required private NoSuchTxnException o2; // required private TxnAbortedException o3; // 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 { O1((short)1, "o1"), O2((short)2, "o2"), O3((short)3, "o3"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; case 3: // O3 return O3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", 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(heartbeat_result.class, metaDataMap); } public heartbeat_result() { } public heartbeat_result( NoSuchLockException o1, NoSuchTxnException o2, TxnAbortedException o3) { this(); this.o1 = o1; this.o2 = o2; this.o3 = o3; } /** * Performs a deep copy on other. */ public heartbeat_result(heartbeat_result other) { if (other.isSetO1()) { this.o1 = new NoSuchLockException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchTxnException(other.o2); } if (other.isSetO3()) { this.o3 = new TxnAbortedException(other.o3); } } public heartbeat_result deepCopy() { return new heartbeat_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; this.o3 = null; } public NoSuchLockException getO1() { return this.o1; } public void setO1(NoSuchLockException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchTxnException getO2() { return this.o2; } public void setO2(NoSuchTxnException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public TxnAbortedException getO3() { return this.o3; } public void setO3(TxnAbortedException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchLockException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchTxnException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((TxnAbortedException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof heartbeat_result) return this.equals((heartbeat_result)that); return false; } public boolean equals(heartbeat_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); boolean present_o3 = true && (isSetO3()); builder.append(present_o3); if (present_o3) builder.append(o3); return builder.toHashCode(); } public int compareTo(heartbeat_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; heartbeat_result typedOther = (heartbeat_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("heartbeat_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class heartbeat_resultStandardSchemeFactory implements SchemeFactory { public heartbeat_resultStandardScheme getScheme() { return new heartbeat_resultStandardScheme(); } } private static class heartbeat_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchLockException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new NoSuchTxnException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // O3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o3 = new TxnAbortedException(); struct.o3.read(iprot); struct.setO3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } if (struct.o3 != null) { oprot.writeFieldBegin(O3_FIELD_DESC); struct.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class heartbeat_resultTupleSchemeFactory implements SchemeFactory { public heartbeat_resultTupleScheme getScheme() { return new heartbeat_resultTupleScheme(); } } private static class heartbeat_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } if (struct.isSetO3()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } if (struct.isSetO3()) { struct.o3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.o1 = new NoSuchLockException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new NoSuchTxnException(); struct.o2.read(iprot); struct.setO2IsSet(true); } if (incoming.get(2)) { struct.o3 = new TxnAbortedException(); struct.o3.read(iprot); struct.setO3IsSet(true); } } } } public static class heartbeat_txn_range_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_args"); private static final org.apache.thrift.protocol.TField TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("txns", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new heartbeat_txn_range_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new heartbeat_txn_range_argsTupleSchemeFactory()); } private HeartbeatTxnRangeRequest txns; // 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 { TXNS((short)1, "txns"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // TXNS return TXNS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.TXNS, new org.apache.thrift.meta_data.FieldMetaData("txns", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_args.class, metaDataMap); } public heartbeat_txn_range_args() { } public heartbeat_txn_range_args( HeartbeatTxnRangeRequest txns) { this(); this.txns = txns; } /** * Performs a deep copy on other. */ public heartbeat_txn_range_args(heartbeat_txn_range_args other) { if (other.isSetTxns()) { this.txns = new HeartbeatTxnRangeRequest(other.txns); } } public heartbeat_txn_range_args deepCopy() { return new heartbeat_txn_range_args(this); } @Override public void clear() { this.txns = null; } public HeartbeatTxnRangeRequest getTxns() { return this.txns; } public void setTxns(HeartbeatTxnRangeRequest txns) { this.txns = txns; } public void unsetTxns() { this.txns = null; } /** Returns true if field txns is set (has been assigned a value) and false otherwise */ public boolean isSetTxns() { return this.txns != null; } public void setTxnsIsSet(boolean value) { if (!value) { this.txns = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TXNS: if (value == null) { unsetTxns(); } else { setTxns((HeartbeatTxnRangeRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TXNS: return getTxns(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 TXNS: return isSetTxns(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof heartbeat_txn_range_args) return this.equals((heartbeat_txn_range_args)that); return false; } public boolean equals(heartbeat_txn_range_args that) { if (that == null) return false; boolean this_present_txns = true && this.isSetTxns(); boolean that_present_txns = true && that.isSetTxns(); if (this_present_txns || that_present_txns) { if (!(this_present_txns && that_present_txns)) return false; if (!this.txns.equals(that.txns)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_txns = true && (isSetTxns()); builder.append(present_txns); if (present_txns) builder.append(txns); return builder.toHashCode(); } public int compareTo(heartbeat_txn_range_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; heartbeat_txn_range_args typedOther = (heartbeat_txn_range_args)other; lastComparison = Boolean.valueOf(isSetTxns()).compareTo(typedOther.isSetTxns()); if (lastComparison != 0) { return lastComparison; } if (isSetTxns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, typedOther.txns); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("heartbeat_txn_range_args("); boolean first = true; sb.append("txns:"); if (this.txns == null) { sb.append("null"); } else { sb.append(this.txns); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (txns != null) { txns.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class heartbeat_txn_range_argsStandardSchemeFactory implements SchemeFactory { public heartbeat_txn_range_argsStandardScheme getScheme() { return new heartbeat_txn_range_argsStandardScheme(); } } private static class heartbeat_txn_range_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TXNS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.txns = new HeartbeatTxnRangeRequest(); struct.txns.read(iprot); struct.setTxnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.txns != null) { oprot.writeFieldBegin(TXNS_FIELD_DESC); struct.txns.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class heartbeat_txn_range_argsTupleSchemeFactory implements SchemeFactory { public heartbeat_txn_range_argsTupleScheme getScheme() { return new heartbeat_txn_range_argsTupleScheme(); } } private static class heartbeat_txn_range_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTxns()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTxns()) { struct.txns.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.txns = new HeartbeatTxnRangeRequest(); struct.txns.read(iprot); struct.setTxnsIsSet(true); } } } } public static class heartbeat_txn_range_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new heartbeat_txn_range_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new heartbeat_txn_range_resultTupleSchemeFactory()); } private HeartbeatTxnRangeResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, HeartbeatTxnRangeResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); } public heartbeat_txn_range_result() { } public heartbeat_txn_range_result( HeartbeatTxnRangeResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public heartbeat_txn_range_result(heartbeat_txn_range_result other) { if (other.isSetSuccess()) { this.success = new HeartbeatTxnRangeResponse(other.success); } } public heartbeat_txn_range_result deepCopy() { return new heartbeat_txn_range_result(this); } @Override public void clear() { this.success = null; } public HeartbeatTxnRangeResponse getSuccess() { return this.success; } public void setSuccess(HeartbeatTxnRangeResponse 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((HeartbeatTxnRangeResponse)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 heartbeat_txn_range_result) return this.equals((heartbeat_txn_range_result)that); return false; } public boolean equals(heartbeat_txn_range_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(heartbeat_txn_range_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; heartbeat_txn_range_result typedOther = (heartbeat_txn_range_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("heartbeat_txn_range_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { public heartbeat_txn_range_resultStandardScheme getScheme() { return new heartbeat_txn_range_resultStandardScheme(); } } private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new HeartbeatTxnRangeResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { public heartbeat_txn_range_resultTupleScheme getScheme() { return new heartbeat_txn_range_resultTupleScheme(); } } private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new HeartbeatTxnRangeResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); } private CompactionRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); } public compact_args() { } public compact_args( CompactionRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public compact_args(compact_args other) { if (other.isSetRqst()) { this.rqst = new CompactionRequest(other.rqst); } } public compact_args deepCopy() { return new compact_args(this); } @Override public void clear() { this.rqst = null; } public CompactionRequest getRqst() { return this.rqst; } public void setRqst(CompactionRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((CompactionRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof compact_args) return this.equals((compact_args)that); return false; } public boolean equals(compact_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(compact_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; compact_args typedOther = (compact_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("compact_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class compact_argsStandardSchemeFactory implements SchemeFactory { public compact_argsStandardScheme getScheme() { return new compact_argsStandardScheme(); } } private static class compact_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new CompactionRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class compact_argsTupleSchemeFactory implements SchemeFactory { public compact_argsTupleScheme getScheme() { return new compact_argsTupleScheme(); } } private static class compact_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new CompactionRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(compact_result.class, metaDataMap); } public compact_result() { } /** * Performs a deep copy on other. */ public compact_result(compact_result other) { } public compact_result deepCopy() { return new compact_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 compact_result) return this.equals((compact_result)that); return false; } public boolean equals(compact_result that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(compact_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; compact_result typedOther = (compact_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("compact_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class compact_resultStandardSchemeFactory implements SchemeFactory { public compact_resultStandardScheme getScheme() { return new compact_resultStandardScheme(); } } private static class compact_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class compact_resultTupleSchemeFactory implements SchemeFactory { public compact_resultTupleScheme getScheme() { return new compact_resultTupleScheme(); } } private static class compact_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class show_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new show_compact_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new show_compact_argsTupleSchemeFactory()); } private ShowCompactRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_args.class, metaDataMap); } public show_compact_args() { } public show_compact_args( ShowCompactRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public show_compact_args(show_compact_args other) { if (other.isSetRqst()) { this.rqst = new ShowCompactRequest(other.rqst); } } public show_compact_args deepCopy() { return new show_compact_args(this); } @Override public void clear() { this.rqst = null; } public ShowCompactRequest getRqst() { return this.rqst; } public void setRqst(ShowCompactRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((ShowCompactRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof show_compact_args) return this.equals((show_compact_args)that); return false; } public boolean equals(show_compact_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(show_compact_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; show_compact_args typedOther = (show_compact_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("show_compact_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class show_compact_argsStandardSchemeFactory implements SchemeFactory { public show_compact_argsStandardScheme getScheme() { return new show_compact_argsStandardScheme(); } } private static class show_compact_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new ShowCompactRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class show_compact_argsTupleSchemeFactory implements SchemeFactory { public show_compact_argsTupleScheme getScheme() { return new show_compact_argsTupleScheme(); } } private static class show_compact_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new ShowCompactRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class show_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new show_compact_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new show_compact_resultTupleSchemeFactory()); } private ShowCompactResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, ShowCompactResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_result.class, metaDataMap); } public show_compact_result() { } public show_compact_result( ShowCompactResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public show_compact_result(show_compact_result other) { if (other.isSetSuccess()) { this.success = new ShowCompactResponse(other.success); } } public show_compact_result deepCopy() { return new show_compact_result(this); } @Override public void clear() { this.success = null; } public ShowCompactResponse getSuccess() { return this.success; } public void setSuccess(ShowCompactResponse 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((ShowCompactResponse)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 show_compact_result) return this.equals((show_compact_result)that); return false; } public boolean equals(show_compact_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(show_compact_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; show_compact_result typedOther = (show_compact_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("show_compact_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class show_compact_resultStandardSchemeFactory implements SchemeFactory { public show_compact_resultStandardScheme getScheme() { return new show_compact_resultStandardScheme(); } } private static class show_compact_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ShowCompactResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, show_compact_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class show_compact_resultTupleSchemeFactory implements SchemeFactory { public show_compact_resultTupleScheme getScheme() { return new show_compact_resultTupleScheme(); } } private static class show_compact_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new ShowCompactResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class add_dynamic_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_dynamic_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_dynamic_partitions_argsTupleSchemeFactory()); } private AddDynamicPartitions rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddDynamicPartitions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_args.class, metaDataMap); } public add_dynamic_partitions_args() { } public add_dynamic_partitions_args( AddDynamicPartitions rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public add_dynamic_partitions_args(add_dynamic_partitions_args other) { if (other.isSetRqst()) { this.rqst = new AddDynamicPartitions(other.rqst); } } public add_dynamic_partitions_args deepCopy() { return new add_dynamic_partitions_args(this); } @Override public void clear() { this.rqst = null; } public AddDynamicPartitions getRqst() { return this.rqst; } public void setRqst(AddDynamicPartitions rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((AddDynamicPartitions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_dynamic_partitions_args) return this.equals((add_dynamic_partitions_args)that); return false; } public boolean equals(add_dynamic_partitions_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(add_dynamic_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_dynamic_partitions_args typedOther = (add_dynamic_partitions_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_dynamic_partitions_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_dynamic_partitions_argsStandardSchemeFactory implements SchemeFactory { public add_dynamic_partitions_argsStandardScheme getScheme() { return new add_dynamic_partitions_argsStandardScheme(); } } private static class add_dynamic_partitions_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new AddDynamicPartitions(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_dynamic_partitions_argsTupleSchemeFactory implements SchemeFactory { public add_dynamic_partitions_argsTupleScheme getScheme() { return new add_dynamic_partitions_argsTupleScheme(); } } private static class add_dynamic_partitions_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new AddDynamicPartitions(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class add_dynamic_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_dynamic_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_dynamic_partitions_resultTupleSchemeFactory()); } private NoSuchTxnException o1; // required private TxnAbortedException o2; // 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // O1 return O1; case 2: // O2 return O2; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", 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(add_dynamic_partitions_result.class, metaDataMap); } public add_dynamic_partitions_result() { } public add_dynamic_partitions_result( NoSuchTxnException o1, TxnAbortedException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on other. */ public add_dynamic_partitions_result(add_dynamic_partitions_result other) { if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } if (other.isSetO2()) { this.o2 = new TxnAbortedException(other.o2); } } public add_dynamic_partitions_result deepCopy() { return new add_dynamic_partitions_result(this); } @Override public void clear() { this.o1 = null; this.o2 = null; } public NoSuchTxnException getO1() { return this.o1; } public void setO1(NoSuchTxnException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public TxnAbortedException getO2() { return this.o2; } public void setO2(TxnAbortedException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchTxnException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((TxnAbortedException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_dynamic_partitions_result) return this.equals((add_dynamic_partitions_result)that); return false; } public boolean equals(add_dynamic_partitions_result that) { if (that == null) return false; boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_o1 = true && (isSetO1()); builder.append(present_o1); if (present_o1) builder.append(o1); boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); return builder.toHashCode(); } public int compareTo(add_dynamic_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_dynamic_partitions_result typedOther = (add_dynamic_partitions_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_dynamic_partitions_result("); boolean first = true; sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_dynamic_partitions_resultStandardSchemeFactory implements SchemeFactory { public add_dynamic_partitions_resultStandardScheme getScheme() { return new add_dynamic_partitions_resultStandardScheme(); } } private static class add_dynamic_partitions_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // O1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // O2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.o1 != null) { oprot.writeFieldBegin(O1_FIELD_DESC); struct.o1.write(oprot); oprot.writeFieldEnd(); } if (struct.o2 != null) { oprot.writeFieldBegin(O2_FIELD_DESC); struct.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_dynamic_partitions_resultTupleSchemeFactory implements SchemeFactory { public add_dynamic_partitions_resultTupleScheme getScheme() { return new add_dynamic_partitions_resultTupleScheme(); } } private static class add_dynamic_partitions_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetO1()) { optionals.set(0); } if (struct.isSetO2()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetO1()) { struct.o1.write(oprot); } if (struct.isSetO2()) { struct.o2.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.o1 = new NoSuchTxnException(); struct.o1.read(iprot); struct.setO1IsSet(true); } if (incoming.get(1)) { struct.o2 = new TxnAbortedException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_next_notification_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_next_notification_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_next_notification_argsTupleSchemeFactory()); } private NotificationEventRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEventRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_args.class, metaDataMap); } public get_next_notification_args() { } public get_next_notification_args( NotificationEventRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public get_next_notification_args(get_next_notification_args other) { if (other.isSetRqst()) { this.rqst = new NotificationEventRequest(other.rqst); } } public get_next_notification_args deepCopy() { return new get_next_notification_args(this); } @Override public void clear() { this.rqst = null; } public NotificationEventRequest getRqst() { return this.rqst; } public void setRqst(NotificationEventRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((NotificationEventRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_next_notification_args) return this.equals((get_next_notification_args)that); return false; } public boolean equals(get_next_notification_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(get_next_notification_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_next_notification_args typedOther = (get_next_notification_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_next_notification_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_next_notification_argsStandardSchemeFactory implements SchemeFactory { public get_next_notification_argsStandardScheme getScheme() { return new get_next_notification_argsStandardScheme(); } } private static class get_next_notification_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new NotificationEventRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_next_notification_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_next_notification_argsTupleSchemeFactory implements SchemeFactory { public get_next_notification_argsTupleScheme getScheme() { return new get_next_notification_argsTupleScheme(); } } private static class get_next_notification_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new NotificationEventRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class get_next_notification_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_next_notification_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_next_notification_resultTupleSchemeFactory()); } private NotificationEventResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, NotificationEventResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_result.class, metaDataMap); } public get_next_notification_result() { } public get_next_notification_result( NotificationEventResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public get_next_notification_result(get_next_notification_result other) { if (other.isSetSuccess()) { this.success = new NotificationEventResponse(other.success); } } public get_next_notification_result deepCopy() { return new get_next_notification_result(this); } @Override public void clear() { this.success = null; } public NotificationEventResponse getSuccess() { return this.success; } public void setSuccess(NotificationEventResponse 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((NotificationEventResponse)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_next_notification_result) return this.equals((get_next_notification_result)that); return false; } public boolean equals(get_next_notification_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(get_next_notification_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_next_notification_result typedOther = (get_next_notification_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_next_notification_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_next_notification_resultStandardSchemeFactory implements SchemeFactory { public get_next_notification_resultStandardScheme getScheme() { return new get_next_notification_resultStandardScheme(); } } private static class get_next_notification_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new NotificationEventResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_next_notification_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_next_notification_resultTupleSchemeFactory implements SchemeFactory { public get_next_notification_resultTupleScheme getScheme() { return new get_next_notification_resultTupleScheme(); } } private static class get_next_notification_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new NotificationEventResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class get_current_notificationEventId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_args"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_current_notificationEventId_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_current_notificationEventId_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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(get_current_notificationEventId_args.class, metaDataMap); } public get_current_notificationEventId_args() { } /** * Performs a deep copy on other. */ public get_current_notificationEventId_args(get_current_notificationEventId_args other) { } public get_current_notificationEventId_args deepCopy() { return new get_current_notificationEventId_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 get_current_notificationEventId_args) return this.equals((get_current_notificationEventId_args)that); return false; } public boolean equals(get_current_notificationEventId_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } public int compareTo(get_current_notificationEventId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_current_notificationEventId_args typedOther = (get_current_notificationEventId_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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_current_notificationEventId_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_current_notificationEventId_argsStandardSchemeFactory implements SchemeFactory { public get_current_notificationEventId_argsStandardScheme getScheme() { return new get_current_notificationEventId_argsStandardScheme(); } } private static class get_current_notificationEventId_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_current_notificationEventId_argsTupleSchemeFactory implements SchemeFactory { public get_current_notificationEventId_argsTupleScheme getScheme() { return new get_current_notificationEventId_argsTupleScheme(); } } private static class get_current_notificationEventId_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_current_notificationEventId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_current_notificationEventId_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_current_notificationEventId_resultTupleSchemeFactory()); } private CurrentNotificationEventId success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, CurrentNotificationEventId.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_result.class, metaDataMap); } public get_current_notificationEventId_result() { } public get_current_notificationEventId_result( CurrentNotificationEventId success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public get_current_notificationEventId_result(get_current_notificationEventId_result other) { if (other.isSetSuccess()) { this.success = new CurrentNotificationEventId(other.success); } } public get_current_notificationEventId_result deepCopy() { return new get_current_notificationEventId_result(this); } @Override public void clear() { this.success = null; } public CurrentNotificationEventId getSuccess() { return this.success; } public void setSuccess(CurrentNotificationEventId 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((CurrentNotificationEventId)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_current_notificationEventId_result) return this.equals((get_current_notificationEventId_result)that); return false; } public boolean equals(get_current_notificationEventId_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(get_current_notificationEventId_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_current_notificationEventId_result typedOther = (get_current_notificationEventId_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_current_notificationEventId_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_current_notificationEventId_resultStandardSchemeFactory implements SchemeFactory { public get_current_notificationEventId_resultStandardScheme getScheme() { return new get_current_notificationEventId_resultStandardScheme(); } } private static class get_current_notificationEventId_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new CurrentNotificationEventId(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_current_notificationEventId_resultTupleSchemeFactory implements SchemeFactory { public get_current_notificationEventId_resultTupleScheme getScheme() { return new get_current_notificationEventId_resultTupleScheme(); } } private static class get_current_notificationEventId_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new CurrentNotificationEventId(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class fire_listener_event_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new fire_listener_event_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new fire_listener_event_argsTupleSchemeFactory()); } private FireEventRequest rqst; // 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 { RQST((short)1, "rqst"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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: // RQST return RQST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_args.class, metaDataMap); } public fire_listener_event_args() { } public fire_listener_event_args( FireEventRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on other. */ public fire_listener_event_args(fire_listener_event_args other) { if (other.isSetRqst()) { this.rqst = new FireEventRequest(other.rqst); } } public fire_listener_event_args deepCopy() { return new fire_listener_event_args(this); } @Override public void clear() { this.rqst = null; } public FireEventRequest getRqst() { return this.rqst; } public void setRqst(FireEventRequest rqst) { this.rqst = rqst; } public void unsetRqst() { this.rqst = null; } /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ public boolean isSetRqst() { return this.rqst != null; } public void setRqstIsSet(boolean value) { if (!value) { this.rqst = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case RQST: if (value == null) { unsetRqst(); } else { setRqst((FireEventRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RQST: return getRqst(); } throw new IllegalStateException(); } /** Returns true if field corresponding to 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 RQST: return isSetRqst(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof fire_listener_event_args) return this.equals((fire_listener_event_args)that); return false; } public boolean equals(fire_listener_event_args that) { if (that == null) return false; boolean this_present_rqst = true && this.isSetRqst(); boolean that_present_rqst = true && that.isSetRqst(); if (this_present_rqst || that_present_rqst) { if (!(this_present_rqst && that_present_rqst)) return false; if (!this.rqst.equals(that.rqst)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rqst = true && (isSetRqst()); builder.append(present_rqst); if (present_rqst) builder.append(rqst); return builder.toHashCode(); } public int compareTo(fire_listener_event_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; fire_listener_event_args typedOther = (fire_listener_event_args)other; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(typedOther.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, typedOther.rqst); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("fire_listener_event_args("); boolean first = true; sb.append("rqst:"); if (this.rqst == null) { sb.append("null"); } else { sb.append(this.rqst); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (rqst != null) { rqst.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class fire_listener_event_argsStandardSchemeFactory implements SchemeFactory { public fire_listener_event_argsStandardScheme getScheme() { return new fire_listener_event_argsStandardScheme(); } } private static class fire_listener_event_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // RQST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rqst = new FireEventRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, fire_listener_event_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.rqst != null) { oprot.writeFieldBegin(RQST_FIELD_DESC); struct.rqst.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class fire_listener_event_argsTupleSchemeFactory implements SchemeFactory { public fire_listener_event_argsTupleScheme getScheme() { return new fire_listener_event_argsTupleScheme(); } } private static class fire_listener_event_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRqst()) { struct.rqst.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new FireEventRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class fire_listener_event_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new fire_listener_event_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new fire_listener_event_resultTupleSchemeFactory()); } private FireEventResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(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, FireEventResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_result.class, metaDataMap); } public fire_listener_event_result() { } public fire_listener_event_result( FireEventResponse success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public fire_listener_event_result(fire_listener_event_result other) { if (other.isSetSuccess()) { this.success = new FireEventResponse(other.success); } } public fire_listener_event_result deepCopy() { return new fire_listener_event_result(this); } @Override public void clear() { this.success = null; } public FireEventResponse getSuccess() { return this.success; } public void setSuccess(FireEventResponse 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((FireEventResponse)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 fire_listener_event_result) return this.equals((fire_listener_event_result)that); return false; } public boolean equals(fire_listener_event_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } public int compareTo(fire_listener_event_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; fire_listener_event_result typedOther = (fire_listener_event_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("fire_listener_event_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class fire_listener_event_resultStandardSchemeFactory implements SchemeFactory { public fire_listener_event_resultStandardScheme getScheme() { return new fire_listener_event_resultStandardScheme(); } } private static class fire_listener_event_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new FireEventResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, fire_listener_event_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class fire_listener_event_resultTupleSchemeFactory implements SchemeFactory { public fire_listener_event_resultTupleScheme getScheme() { return new fire_listener_event_resultTupleScheme(); } } private static class fire_listener_event_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new FireEventResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } }