/** * Autogenerated by Thrift Compiler (0.9.3) * * 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.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 org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; 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 javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") 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<String> get_databases(String pattern) throws MetaException, org.apache.thrift.TException; public List<String> 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<String,Type> get_type_all(String name) throws MetaException, org.apache.thrift.TException; public List<FieldSchema> get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; public List<FieldSchema> get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; public List<FieldSchema> get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; public List<FieldSchema> 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 create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; public void drop_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, 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 void truncate_table(String dbName, String tableName, List<String> partNames) throws MetaException, org.apache.thrift.TException; public List<String> get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException; public List<String> get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException; public List<TableMeta> get_table_meta(String db_patterns, String tbl_patterns, List<String> tbl_types) throws MetaException, org.apache.thrift.TException; public List<String> 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<Table> get_table_objects_by_name(String dbname, List<String> tbl_names) throws org.apache.thrift.TException; public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException; public List<String> 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<Partition> new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; public int add_partitions_pspec(List<PartitionSpec> new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; public Partition append_partition(String db_name, String tbl_name, List<String> 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<String> 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<String> 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<String> 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<String> part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public Partition exchange_partition(Map<String,String> 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 List<Partition> exchange_partitions(Map<String,String> 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<String> part_vals, String user_name, List<String> 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<Partition> get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public List<Partition> get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public List<PartitionSpec> get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public List<String> get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException; public List<Partition> get_partitions_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public List<Partition> get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public List<String> get_partition_names_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public List<Partition> get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public List<PartitionSpec> 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 int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public List<Partition> get_partitions_by_names(String db_name, String tbl_name, List<String> 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<Partition> new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException; public void alter_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context) 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<String> part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException; public boolean partition_name_has_valid_characters(List<String> 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<String> partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException; public Map<String,String> partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException; public void markPartitionForEvent(String db_name, String tbl_name, Map<String,String> 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<String,String> 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<Index> get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public List<String> get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException; public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, 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<String> 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 GetAllFunctionsResponse get_all_functions() throws MetaException, 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<String> 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<Role> 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<String> group_names) throws MetaException, org.apache.thrift.TException; public List<HiveObjectPrivilege> 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<String> set_ugi(String user_name, List<String> 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 boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException; public boolean remove_token(String token_identifier) throws org.apache.thrift.TException; public String get_token(String token_identifier) throws org.apache.thrift.TException; public List<String> get_all_token_identifiers() throws org.apache.thrift.TException; public int add_master_key(String key) throws MetaException, org.apache.thrift.TException; public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException; public List<String> get_master_keys() throws 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 abort_txns(AbortTxnsRequest 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 CompactionResponse compact2(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 void flushCache() throws org.apache.thrift.TException; public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException; public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException; public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException; public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException; public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException; public String get_metastore_db_uuid() throws MetaException, 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 create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add_foreign_key(AddForeignKeyRequest req, 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 truncate_table(String dbName, String tableName, List<String> partNames, 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_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_table_meta(String db_patterns, String tbl_patterns, List<String> tbl_types, 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<String> tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_table_objects_by_name_req(GetTablesRequest req, 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<Partition> new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add_partitions_pspec(List<PartitionSpec> new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void append_partition(String db_name, String tbl_name, List<String> 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<String> 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<String> 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<String> 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<String> part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void exchange_partition(Map<String,String> 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 exchange_partitions(Map<String,String> 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<String> part_vals, String user_name, List<String> 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<String> 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<String> 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<String> part_vals, short max_parts, String user_name, List<String> 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<String> 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_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_partitions_by_names(String db_name, String tbl_name, List<String> 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<Partition> new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void alter_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context, 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<String> part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void partition_name_has_valid_characters(List<String> 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<String,String> 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<String,String> 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 get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_foreign_keys(ForeignKeysRequest request, 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 get_all_functions(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<String> 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<String> 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 add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_master_keys(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 abort_txns(AbortTxnsRequest 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 compact2(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 void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_metastore_db_uuid(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<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public 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<String> 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<String> 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<String> 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<String> 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<String,Type> 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<String,Type> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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 create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { send_create_table_with_constraints(tbl, primaryKeys, foreignKeys); recv_create_table_with_constraints(); } public void send_create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws org.apache.thrift.TException { create_table_with_constraints_args args = new create_table_with_constraints_args(); args.setTbl(tbl); args.setPrimaryKeys(primaryKeys); args.setForeignKeys(foreignKeys); sendBase("create_table_with_constraints", args); } public void recv_create_table_with_constraints() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { create_table_with_constraints_result result = new create_table_with_constraints_result(); receiveBase(result, "create_table_with_constraints"); 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_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_constraint(req); recv_drop_constraint(); } public void send_drop_constraint(DropConstraintRequest req) throws org.apache.thrift.TException { drop_constraint_args args = new drop_constraint_args(); args.setReq(req); sendBase("drop_constraint", args); } public void recv_drop_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { drop_constraint_result result = new drop_constraint_result(); receiveBase(result, "drop_constraint"); if (result.o1 != null) { throw result.o1; } if (result.o3 != null) { throw result.o3; } return; } public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_add_primary_key(req); recv_add_primary_key(); } public void send_add_primary_key(AddPrimaryKeyRequest req) throws org.apache.thrift.TException { add_primary_key_args args = new add_primary_key_args(); args.setReq(req); sendBase("add_primary_key", args); } public void recv_add_primary_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { add_primary_key_result result = new add_primary_key_result(); receiveBase(result, "add_primary_key"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_add_foreign_key(req); recv_add_foreign_key(); } public void send_add_foreign_key(AddForeignKeyRequest req) throws org.apache.thrift.TException { add_foreign_key_args args = new add_foreign_key_args(); args.setReq(req); sendBase("add_foreign_key", args); } public void recv_add_foreign_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { add_foreign_key_result result = new add_foreign_key_result(); receiveBase(result, "add_foreign_key"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } 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 void truncate_table(String dbName, String tableName, List<String> partNames) throws MetaException, org.apache.thrift.TException { send_truncate_table(dbName, tableName, partNames); recv_truncate_table(); } public void send_truncate_table(String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException { truncate_table_args args = new truncate_table_args(); args.setDbName(dbName); args.setTableName(tableName); args.setPartNames(partNames); sendBase("truncate_table", args); } public void recv_truncate_table() throws MetaException, org.apache.thrift.TException { truncate_table_result result = new truncate_table_result(); receiveBase(result, "truncate_table"); if (result.o1 != null) { throw result.o1; } return; } public List<String> 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<String> 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<String> get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException { send_get_tables_by_type(db_name, pattern, tableType); return recv_get_tables_by_type(); } public void send_get_tables_by_type(String db_name, String pattern, String tableType) throws org.apache.thrift.TException { get_tables_by_type_args args = new get_tables_by_type_args(); args.setDb_name(db_name); args.setPattern(pattern); args.setTableType(tableType); sendBase("get_tables_by_type", args); } public List<String> recv_get_tables_by_type() throws MetaException, org.apache.thrift.TException { get_tables_by_type_result result = new get_tables_by_type_result(); receiveBase(result, "get_tables_by_type"); 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_by_type failed: unknown result"); } public List<TableMeta> get_table_meta(String db_patterns, String tbl_patterns, List<String> tbl_types) throws MetaException, org.apache.thrift.TException { send_get_table_meta(db_patterns, tbl_patterns, tbl_types); return recv_get_table_meta(); } public void send_get_table_meta(String db_patterns, String tbl_patterns, List<String> tbl_types) throws org.apache.thrift.TException { get_table_meta_args args = new get_table_meta_args(); args.setDb_patterns(db_patterns); args.setTbl_patterns(tbl_patterns); args.setTbl_types(tbl_types); sendBase("get_table_meta", args); } public List<TableMeta> recv_get_table_meta() throws MetaException, org.apache.thrift.TException { get_table_meta_result result = new get_table_meta_result(); receiveBase(result, "get_table_meta"); 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_table_meta failed: unknown result"); } public List<String> 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<String> 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<Table> get_table_objects_by_name(String dbname, List<String> tbl_names) throws 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<String> 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<Table> recv_get_table_objects_by_name() throws 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; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_table_req(req); return recv_get_table_req(); } public void send_get_table_req(GetTableRequest req) throws org.apache.thrift.TException { get_table_req_args args = new get_table_req_args(); args.setReq(req); sendBase("get_table_req", args); } public GetTableResult recv_get_table_req() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_table_req_result result = new get_table_req_result(); receiveBase(result, "get_table_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_req failed: unknown result"); } public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { send_get_table_objects_by_name_req(req); return recv_get_table_objects_by_name_req(); } public void send_get_table_objects_by_name_req(GetTablesRequest req) throws org.apache.thrift.TException { get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); args.setReq(req); sendBase("get_table_objects_by_name_req", args); } public GetTablesResult recv_get_table_objects_by_name_req() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); receiveBase(result, "get_table_objects_by_name_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, "get_table_objects_by_name_req failed: unknown result"); } public List<String> 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<String> 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<Partition> 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<Partition> 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<PartitionSpec> 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<PartitionSpec> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String,String> 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<String,String> 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 List<Partition> exchange_partitions(Map<String,String> 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_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); return recv_exchange_partitions(); } public void send_exchange_partitions(Map<String,String> partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException { exchange_partitions_args args = new exchange_partitions_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_partitions", args); } public List<Partition> recv_exchange_partitions() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { exchange_partitions_result result = new exchange_partitions_result(); receiveBase(result, "exchange_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; } if (result.o4 != null) { throw result.o4; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result"); } public Partition get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> 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<String> part_vals, String user_name, List<String> 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<Partition> 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<Partition> 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<Partition> get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> 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<String> 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<Partition> 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<PartitionSpec> 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<PartitionSpec> 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<String> 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<String> 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<Partition> get_partitions_ps(String db_name, String tbl_name, List<String> 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<String> 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<Partition> 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<Partition> get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> 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<String> part_vals, short max_parts, String user_name, List<String> 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<Partition> 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<String> get_partition_names_ps(String db_name, String tbl_name, List<String> 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<String> 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<String> 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<Partition> 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<Partition> 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<PartitionSpec> 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<PartitionSpec> 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 int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_num_partitions_by_filter(db_name, tbl_name, filter); return recv_get_num_partitions_by_filter(); } public void send_get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws org.apache.thrift.TException { get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); sendBase("get_num_partitions_by_filter", args); } public int recv_get_num_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); receiveBase(result, "get_num_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_num_partitions_by_filter failed: unknown result"); } public List<Partition> get_partitions_by_names(String db_name, String tbl_name, List<String> 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<String> 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<Partition> 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<Partition> 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<Partition> 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_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException { send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); recv_alter_partitions_with_environment_context(); } public void send_alter_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context) throws org.apache.thrift.TException { alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_parts(new_parts); args.setEnvironment_context(environment_context); sendBase("alter_partitions_with_environment_context", args); } public void recv_alter_partitions_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException { alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); receiveBase(result, "alter_partitions_with_environment_context"); 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String,String> 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<String,String> 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<String,String> 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<String,String> 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<String,String> 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<String,String> 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<Index> 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<Index> 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<String> 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<String> 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 PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_primary_keys(request); return recv_get_primary_keys(); } public void send_get_primary_keys(PrimaryKeysRequest request) throws org.apache.thrift.TException { get_primary_keys_args args = new get_primary_keys_args(); args.setRequest(request); sendBase("get_primary_keys", args); } public PrimaryKeysResponse recv_get_primary_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_primary_keys_result result = new get_primary_keys_result(); receiveBase(result, "get_primary_keys"); 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_primary_keys failed: unknown result"); } public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException { send_get_foreign_keys(request); return recv_get_foreign_keys(); } public void send_get_foreign_keys(ForeignKeysRequest request) throws org.apache.thrift.TException { get_foreign_keys_args args = new get_foreign_keys_args(); args.setRequest(request); sendBase("get_foreign_keys", args); } public ForeignKeysResponse recv_get_foreign_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { get_foreign_keys_result result = new get_foreign_keys_result(); receiveBase(result, "get_foreign_keys"); 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_foreign_keys 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<String> 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<String> 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 GetAllFunctionsResponse get_all_functions() throws MetaException, org.apache.thrift.TException { send_get_all_functions(); return recv_get_all_functions(); } public void send_get_all_functions() throws org.apache.thrift.TException { get_all_functions_args args = new get_all_functions_args(); sendBase("get_all_functions", args); } public GetAllFunctionsResponse recv_get_all_functions() throws MetaException, org.apache.thrift.TException { get_all_functions_result result = new get_all_functions_result(); receiveBase(result, "get_all_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_all_functions 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<String> 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<String> 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<Role> 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<Role> 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<String> 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<String> 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<HiveObjectPrivilege> 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<HiveObjectPrivilege> 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<String> set_ugi(String user_name, List<String> 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<String> 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<String> 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 boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException { send_add_token(token_identifier, delegation_token); return recv_add_token(); } public void send_add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException { add_token_args args = new add_token_args(); args.setToken_identifier(token_identifier); args.setDelegation_token(delegation_token); sendBase("add_token", args); } public boolean recv_add_token() throws org.apache.thrift.TException { add_token_result result = new add_token_result(); receiveBase(result, "add_token"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_token failed: unknown result"); } public boolean remove_token(String token_identifier) throws org.apache.thrift.TException { send_remove_token(token_identifier); return recv_remove_token(); } public void send_remove_token(String token_identifier) throws org.apache.thrift.TException { remove_token_args args = new remove_token_args(); args.setToken_identifier(token_identifier); sendBase("remove_token", args); } public boolean recv_remove_token() throws org.apache.thrift.TException { remove_token_result result = new remove_token_result(); receiveBase(result, "remove_token"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_token failed: unknown result"); } public String get_token(String token_identifier) throws org.apache.thrift.TException { send_get_token(token_identifier); return recv_get_token(); } public void send_get_token(String token_identifier) throws org.apache.thrift.TException { get_token_args args = new get_token_args(); args.setToken_identifier(token_identifier); sendBase("get_token", args); } public String recv_get_token() throws org.apache.thrift.TException { get_token_result result = new get_token_result(); receiveBase(result, "get_token"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_token failed: unknown result"); } public List<String> get_all_token_identifiers() throws org.apache.thrift.TException { send_get_all_token_identifiers(); return recv_get_all_token_identifiers(); } public void send_get_all_token_identifiers() throws org.apache.thrift.TException { get_all_token_identifiers_args args = new get_all_token_identifiers_args(); sendBase("get_all_token_identifiers", args); } public List<String> recv_get_all_token_identifiers() throws org.apache.thrift.TException { get_all_token_identifiers_result result = new get_all_token_identifiers_result(); receiveBase(result, "get_all_token_identifiers"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); } public int add_master_key(String key) throws MetaException, org.apache.thrift.TException { send_add_master_key(key); return recv_add_master_key(); } public void send_add_master_key(String key) throws org.apache.thrift.TException { add_master_key_args args = new add_master_key_args(); args.setKey(key); sendBase("add_master_key", args); } public int recv_add_master_key() throws MetaException, org.apache.thrift.TException { add_master_key_result result = new add_master_key_result(); receiveBase(result, "add_master_key"); 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, "add_master_key failed: unknown result"); } public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_update_master_key(seq_number, key); recv_update_master_key(); } public void send_update_master_key(int seq_number, String key) throws org.apache.thrift.TException { update_master_key_args args = new update_master_key_args(); args.setSeq_number(seq_number); args.setKey(key); sendBase("update_master_key", args); } public void recv_update_master_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { update_master_key_result result = new update_master_key_result(); receiveBase(result, "update_master_key"); if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } return; } public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException { send_remove_master_key(key_seq); return recv_remove_master_key(); } public void send_remove_master_key(int key_seq) throws org.apache.thrift.TException { remove_master_key_args args = new remove_master_key_args(); args.setKey_seq(key_seq); sendBase("remove_master_key", args); } public boolean recv_remove_master_key() throws org.apache.thrift.TException { remove_master_key_result result = new remove_master_key_result(); receiveBase(result, "remove_master_key"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result"); } public List<String> get_master_keys() throws org.apache.thrift.TException { send_get_master_keys(); return recv_get_master_keys(); } public void send_get_master_keys() throws org.apache.thrift.TException { get_master_keys_args args = new get_master_keys_args(); sendBase("get_master_keys", args); } public List<String> recv_get_master_keys() throws org.apache.thrift.TException { get_master_keys_result result = new get_master_keys_result(); receiveBase(result, "get_master_keys"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result"); } 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 abort_txns(AbortTxnsRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException { send_abort_txns(rqst); recv_abort_txns(); } public void send_abort_txns(AbortTxnsRequest rqst) throws org.apache.thrift.TException { abort_txns_args args = new abort_txns_args(); args.setRqst(rqst); sendBase("abort_txns", args); } public void recv_abort_txns() throws NoSuchTxnException, org.apache.thrift.TException { abort_txns_result result = new abort_txns_result(); receiveBase(result, "abort_txns"); 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 CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException { send_compact2(rqst); return recv_compact2(); } public void send_compact2(CompactionRequest rqst) throws org.apache.thrift.TException { compact2_args args = new compact2_args(); args.setRqst(rqst); sendBase("compact2", args); } public CompactionResponse recv_compact2() throws org.apache.thrift.TException { compact2_result result = new compact2_result(); receiveBase(result, "compact2"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "compact2 failed: unknown result"); } 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 void flushCache() throws org.apache.thrift.TException { send_flushCache(); recv_flushCache(); } public void send_flushCache() throws org.apache.thrift.TException { flushCache_args args = new flushCache_args(); sendBase("flushCache", args); } public void recv_flushCache() throws org.apache.thrift.TException { flushCache_result result = new flushCache_result(); receiveBase(result, "flushCache"); return; } public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException { send_get_file_metadata_by_expr(req); return recv_get_file_metadata_by_expr(); } public void send_get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException { get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); args.setReq(req); sendBase("get_file_metadata_by_expr", args); } public GetFileMetadataByExprResult recv_get_file_metadata_by_expr() throws org.apache.thrift.TException { get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); receiveBase(result, "get_file_metadata_by_expr"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); } public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException { send_get_file_metadata(req); return recv_get_file_metadata(); } public void send_get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException { get_file_metadata_args args = new get_file_metadata_args(); args.setReq(req); sendBase("get_file_metadata", args); } public GetFileMetadataResult recv_get_file_metadata() throws org.apache.thrift.TException { get_file_metadata_result result = new get_file_metadata_result(); receiveBase(result, "get_file_metadata"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result"); } public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException { send_put_file_metadata(req); return recv_put_file_metadata(); } public void send_put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException { put_file_metadata_args args = new put_file_metadata_args(); args.setReq(req); sendBase("put_file_metadata", args); } public PutFileMetadataResult recv_put_file_metadata() throws org.apache.thrift.TException { put_file_metadata_result result = new put_file_metadata_result(); receiveBase(result, "put_file_metadata"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result"); } public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException { send_clear_file_metadata(req); return recv_clear_file_metadata(); } public void send_clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException { clear_file_metadata_args args = new clear_file_metadata_args(); args.setReq(req); sendBase("clear_file_metadata", args); } public ClearFileMetadataResult recv_clear_file_metadata() throws org.apache.thrift.TException { clear_file_metadata_result result = new clear_file_metadata_result(); receiveBase(result, "clear_file_metadata"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result"); } public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException { send_cache_file_metadata(req); return recv_cache_file_metadata(); } public void send_cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException { cache_file_metadata_args args = new cache_file_metadata_args(); args.setReq(req); sendBase("cache_file_metadata", args); } public CacheFileMetadataResult recv_cache_file_metadata() throws org.apache.thrift.TException { cache_file_metadata_result result = new cache_file_metadata_result(); receiveBase(result, "cache_file_metadata"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result"); } public String get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException { send_get_metastore_db_uuid(); return recv_get_metastore_db_uuid(); } public void send_get_metastore_db_uuid() throws org.apache.thrift.TException { get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); sendBase("get_metastore_db_uuid", args); } public String recv_get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException { get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); receiveBase(result, "get_metastore_db_uuid"); 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_metastore_db_uuid 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<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void 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<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_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<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_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<String,Type> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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<FieldSchema> 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 create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_table_with_constraints_call method_call = new create_table_with_constraints_call(tbl, primaryKeys, foreignKeys, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class create_table_with_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { private Table tbl; private List<SQLPrimaryKey> primaryKeys; private List<SQLForeignKey> foreignKeys; public create_table_with_constraints_call(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, 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.primaryKeys = primaryKeys; this.foreignKeys = foreignKeys; } 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_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); create_table_with_constraints_args args = new create_table_with_constraints_args(); args.setTbl(tbl); args.setPrimaryKeys(primaryKeys); args.setForeignKeys(foreignKeys); 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_constraints(); } } public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_constraint_call method_call = new drop_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class drop_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { private DropConstraintRequest req; public drop_constraint_call(DropConstraintRequest 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_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); drop_constraint_args args = new drop_constraint_args(); args.setReq(req); 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_constraint(); } } public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_primary_key_call method_call = new add_primary_key_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_primary_key_call extends org.apache.thrift.async.TAsyncMethodCall { private AddPrimaryKeyRequest req; public add_primary_key_call(AddPrimaryKeyRequest 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("add_primary_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_primary_key_args args = new add_primary_key_args(); args.setReq(req); 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_add_primary_key(); } } public void add_foreign_key(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_foreign_key_call method_call = new add_foreign_key_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_foreign_key_call extends org.apache.thrift.async.TAsyncMethodCall { private AddForeignKeyRequest req; public add_foreign_key_call(AddForeignKeyRequest 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("add_foreign_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_foreign_key_args args = new add_foreign_key_args(); args.setReq(req); 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_add_foreign_key(); } } 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 truncate_table(String dbName, String tableName, List<String> partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); truncate_table_call method_call = new truncate_table_call(dbName, tableName, partNames, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class truncate_table_call extends org.apache.thrift.async.TAsyncMethodCall { private String dbName; private String tableName; private List<String> partNames; public truncate_table_call(String dbName, String tableName, List<String> partNames, 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.tableName = tableName; this.partNames = partNames; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncate_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); truncate_table_args args = new truncate_table_args(); args.setDbName(dbName); args.setTableName(tableName); args.setPartNames(partNames); 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_truncate_table(); } } 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<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_tables(); } } public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_tables_by_type_call method_call = new get_tables_by_type_call(db_name, pattern, tableType, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_tables_by_type_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String pattern; private String tableType; public get_tables_by_type_call(String db_name, String pattern, String tableType, 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; this.tableType = tableType; } 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_by_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_tables_by_type_args args = new get_tables_by_type_args(); args.setDb_name(db_name); args.setPattern(pattern); args.setTableType(tableType); args.write(prot); prot.writeMessageEnd(); } public List<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_tables_by_type(); } } public void get_table_meta(String db_patterns, String tbl_patterns, List<String> tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_meta_call method_call = new get_table_meta_call(db_patterns, tbl_patterns, tbl_types, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_meta_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_patterns; private String tbl_patterns; private List<String> tbl_types; public get_table_meta_call(String db_patterns, String tbl_patterns, List<String> tbl_types, 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_patterns = db_patterns; this.tbl_patterns = tbl_patterns; this.tbl_types = tbl_types; } 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_meta", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_meta_args args = new get_table_meta_args(); args.setDb_patterns(db_patterns); args.setTbl_patterns(tbl_patterns); args.setTbl_types(tbl_types); args.write(prot); prot.writeMessageEnd(); } public List<TableMeta> 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_table_meta(); } } 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<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_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<String> 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<String> tbl_names; public get_table_objects_by_name_call(String dbname, List<String> 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<Table> 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_table_objects_by_name(); } } public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_req_call method_call = new get_table_req_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_req_call extends org.apache.thrift.async.TAsyncMethodCall { private GetTableRequest req; public get_table_req_call(GetTableRequest 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_table_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_req_args args = new get_table_req_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public GetTableResult 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_req(); } } public void get_table_objects_by_name_req(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_table_objects_by_name_req_call method_call = new get_table_objects_by_name_req_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_table_objects_by_name_req_call extends org.apache.thrift.async.TAsyncMethodCall { private GetTablesRequest req; public get_table_objects_by_name_req_call(GetTablesRequest 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_table_objects_by_name_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public GetTablesResult 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_req(); } } 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<String> 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<Partition> 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<Partition> new_parts; public add_partitions_call(List<Partition> 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<PartitionSpec> 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<PartitionSpec> new_parts; public add_partitions_pspec_call(List<PartitionSpec> 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<String> 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<String> part_vals; public append_partition_call(String db_name, String tbl_name, List<String> 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<String> 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<String> part_vals; private EnvironmentContext environment_context; public append_partition_with_environment_context_call(String db_name, String tbl_name, List<String> 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<String> 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<String> part_vals; private boolean deleteData; public drop_partition_call(String db_name, String tbl_name, List<String> 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<String> 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<String> part_vals; private boolean deleteData; private EnvironmentContext environment_context; public drop_partition_with_environment_context_call(String db_name, String tbl_name, List<String> 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<String> 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<String> part_vals; public get_partition_call(String db_name, String tbl_name, List<String> 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<String,String> 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<String,String> partitionSpecs; private String source_db; private String source_table_name; private String dest_db; private String dest_table_name; public exchange_partition_call(Map<String,String> 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 exchange_partitions(Map<String,String> 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_partitions_call method_call = new exchange_partitions_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_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { private Map<String,String> partitionSpecs; private String source_db; private String source_table_name; private String dest_db; private String dest_table_name; public exchange_partitions_call(Map<String,String> 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_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); exchange_partitions_args args = new exchange_partitions_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 List<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_partitions(); } } public void get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> 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<String> part_vals; private String user_name; private List<String> group_names; public get_partition_with_auth_call(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> 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<Partition> 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<String> 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<String> group_names; public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List<String> 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<Partition> 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<PartitionSpec> 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<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_partition_names(); } } public void get_partitions_ps(String db_name, String tbl_name, List<String> 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<String> part_vals; private short max_parts; public get_partitions_ps_call(String db_name, String tbl_name, List<String> 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<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_partitions_ps(); } } public void get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> 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<String> part_vals; private short max_parts; private String user_name; private List<String> group_names; public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> 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<Partition> 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<String> 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<String> part_vals; private short max_parts; public get_partition_names_ps_call(String db_name, String tbl_name, List<String> 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<String> 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<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_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<PartitionSpec> 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_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_num_partitions_by_filter_call method_call = new get_num_partitions_by_filter_call(db_name, tbl_name, filter, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_num_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private String filter; public get_num_partitions_by_filter_call(String db_name, String tbl_name, String filter, 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; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_num_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setFilter(filter); args.write(prot); prot.writeMessageEnd(); } public int 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_num_partitions_by_filter(); } } public void get_partitions_by_names(String db_name, String tbl_name, List<String> 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<String> names; public get_partitions_by_names_call(String db_name, String tbl_name, List<String> 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<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_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<Partition> 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<Partition> new_parts; public alter_partitions_call(String db_name, String tbl_name, List<Partition> 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_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); alter_partitions_with_environment_context_call method_call = new alter_partitions_with_environment_context_call(db_name, tbl_name, new_parts, environment_context, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alter_partitions_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { private String db_name; private String tbl_name; private List<Partition> new_parts; private EnvironmentContext environment_context; public alter_partitions_with_environment_context_call(String db_name, String tbl_name, List<Partition> new_parts, 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_parts = new_parts; 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_partitions_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); args.setNew_parts(new_parts); 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_partitions_with_environment_context(); } } 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<String> 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<String> part_vals; private Partition new_part; public rename_partition_call(String db_name, String tbl_name, List<String> 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<String> 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<String> part_vals; private boolean throw_exception; public partition_name_has_valid_characters_call(List<String> 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<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_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<String,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_partition_name_to_spec(); } } public void markPartitionForEvent(String db_name, String tbl_name, Map<String,String> 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<String,String> part_vals; private PartitionEventType eventType; public markPartitionForEvent_call(String db_name, String tbl_name, Map<String,String> 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<String,String> 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<String,String> part_vals; private PartitionEventType eventType; public isPartitionMarkedForEvent_call(String db_name, String tbl_name, Map<String,String> 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<Index> 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<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_index_names(); } } public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_primary_keys_call method_call = new get_primary_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_primary_keys_call extends org.apache.thrift.async.TAsyncMethodCall { private PrimaryKeysRequest request; public get_primary_keys_call(PrimaryKeysRequest 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_primary_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_primary_keys_args args = new get_primary_keys_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public PrimaryKeysResponse 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_primary_keys(); } } public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_foreign_keys_call method_call = new get_foreign_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_foreign_keys_call extends org.apache.thrift.async.TAsyncMethodCall { private ForeignKeysRequest request; public get_foreign_keys_call(ForeignKeysRequest 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_foreign_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_foreign_keys_args args = new get_foreign_keys_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public ForeignKeysResponse 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_foreign_keys(); } } 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<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_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 get_all_functions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_functions_call method_call = new get_all_functions_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_functions_call extends org.apache.thrift.async.TAsyncMethodCall { public get_all_functions_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_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_functions_args args = new get_all_functions_args(); args.write(prot); prot.writeMessageEnd(); } public GetAllFunctionsResponse 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_functions(); } } 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<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_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<Role> 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<String> 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<String> group_names; public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List<String> 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<HiveObjectPrivilege> 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<String> 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<String> group_names; public set_ugi_call(String user_name, List<String> 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<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_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 add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_token_call method_call = new add_token_call(token_identifier, delegation_token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_identifier; private String delegation_token; public add_token_call(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token_identifier = token_identifier; this.delegation_token = delegation_token; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_token_args args = new add_token_args(); args.setToken_identifier(token_identifier); args.setDelegation_token(delegation_token); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_add_token(); } } public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); remove_token_call method_call = new remove_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_identifier; public remove_token_call(String token_identifier, 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_identifier = token_identifier; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); remove_token_args args = new remove_token_args(); args.setToken_identifier(token_identifier); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_remove_token(); } } public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_token_call method_call = new get_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_token_call extends org.apache.thrift.async.TAsyncMethodCall { private String token_identifier; public get_token_call(String token_identifier, 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_identifier = token_identifier; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_token_args args = new get_token_args(); args.setToken_identifier(token_identifier); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_token(); } } public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_all_token_identifiers_call method_call = new get_all_token_identifiers_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_all_token_identifiers_call extends org.apache.thrift.async.TAsyncMethodCall { public get_all_token_identifiers_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_token_identifiers", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_all_token_identifiers_args args = new get_all_token_identifiers_args(); args.write(prot); prot.writeMessageEnd(); } public List<String> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_token_identifiers(); } } public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); add_master_key_call method_call = new add_master_key_call(key, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class add_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { private String key; public add_master_key_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("add_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); add_master_key_args args = new add_master_key_args(); args.setKey(key); args.write(prot); prot.writeMessageEnd(); } public int 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_add_master_key(); } } public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); update_master_key_call method_call = new update_master_key_call(seq_number, key, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class update_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { private int seq_number; private String key; public update_master_key_call(int seq_number, 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.seq_number = seq_number; 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("update_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); update_master_key_args args = new update_master_key_args(); args.setSeq_number(seq_number); args.setKey(key); 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_update_master_key(); } } public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); remove_master_key_call method_call = new remove_master_key_call(key_seq, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { private int key_seq; public remove_master_key_call(int key_seq, 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_seq = key_seq; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); remove_master_key_args args = new remove_master_key_args(); args.setKey_seq(key_seq); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_remove_master_key(); } } public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_master_keys_call method_call = new get_master_keys_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_master_keys_call extends org.apache.thrift.async.TAsyncMethodCall { public get_master_keys_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_master_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_master_keys_args args = new get_master_keys_args(); args.write(prot); prot.writeMessageEnd(); } public List<String> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_master_keys(); } } 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 abort_txns(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); abort_txns_call method_call = new abort_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class abort_txns_call extends org.apache.thrift.async.TAsyncMethodCall { private AbortTxnsRequest rqst; public abort_txns_call(AbortTxnsRequest 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_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); abort_txns_args args = new abort_txns_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_txns(); } } 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 compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); compact2_call method_call = new compact2_call(rqst, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class compact2_call extends org.apache.thrift.async.TAsyncMethodCall { private CompactionRequest rqst; public compact2_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("compact2", org.apache.thrift.protocol.TMessageType.CALL, 0)); compact2_args args = new compact2_args(); args.setRqst(rqst); args.write(prot); prot.writeMessageEnd(); } public CompactionResponse 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_compact2(); } } 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 void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); flushCache_call method_call = new flushCache_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class flushCache_call extends org.apache.thrift.async.TAsyncMethodCall { public flushCache_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("flushCache", org.apache.thrift.protocol.TMessageType.CALL, 0)); flushCache_args args = new flushCache_args(); 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_flushCache(); } } public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_file_metadata_by_expr_call method_call = new get_file_metadata_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_file_metadata_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { private GetFileMetadataByExprRequest req; public get_file_metadata_by_expr_call(GetFileMetadataByExprRequest 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_file_metadata_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public GetFileMetadataByExprResult 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_file_metadata_by_expr(); } } public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_file_metadata_call method_call = new get_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { private GetFileMetadataRequest req; public get_file_metadata_call(GetFileMetadataRequest 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_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_file_metadata_args args = new get_file_metadata_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public GetFileMetadataResult 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_file_metadata(); } } public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); put_file_metadata_call method_call = new put_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class put_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { private PutFileMetadataRequest req; public put_file_metadata_call(PutFileMetadataRequest 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("put_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); put_file_metadata_args args = new put_file_metadata_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public PutFileMetadataResult 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_put_file_metadata(); } } public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); clear_file_metadata_call method_call = new clear_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class clear_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { private ClearFileMetadataRequest req; public clear_file_metadata_call(ClearFileMetadataRequest 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("clear_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); clear_file_metadata_args args = new clear_file_metadata_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public ClearFileMetadataResult 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_clear_file_metadata(); } } public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); cache_file_metadata_call method_call = new cache_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class cache_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { private CacheFileMetadataRequest req; public cache_file_metadata_call(CacheFileMetadataRequest 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("cache_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); cache_file_metadata_args args = new cache_file_metadata_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public CacheFileMetadataResult 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_cache_file_metadata(); } } public void get_metastore_db_uuid(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_metastore_db_uuid_call method_call = new get_metastore_db_uuid_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_metastore_db_uuid_call extends org.apache.thrift.async.TAsyncMethodCall { public get_metastore_db_uuid_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_metastore_db_uuid", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); 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_metastore_db_uuid(); } } } public static class Processor<I extends Iface> extends com.facebook.fb303.FacebookService.Processor<I> implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("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("create_table_with_constraints", new create_table_with_constraints()); processMap.put("drop_constraint", new drop_constraint()); processMap.put("add_primary_key", new add_primary_key()); processMap.put("add_foreign_key", new add_foreign_key()); processMap.put("drop_table", new drop_table()); processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); processMap.put("truncate_table", new truncate_table()); processMap.put("get_tables", new get_tables()); processMap.put("get_tables_by_type", new get_tables_by_type()); processMap.put("get_table_meta", new get_table_meta()); 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_req", new get_table_req()); processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); 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("exchange_partitions", new exchange_partitions()); 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_num_partitions_by_filter", new get_num_partitions_by_filter()); 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_partitions_with_environment_context", new alter_partitions_with_environment_context()); 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("get_primary_keys", new get_primary_keys()); processMap.put("get_foreign_keys", new get_foreign_keys()); 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("get_all_functions", new get_all_functions()); 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("add_token", new add_token()); processMap.put("remove_token", new remove_token()); processMap.put("get_token", new get_token()); processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); processMap.put("add_master_key", new add_master_key()); processMap.put("update_master_key", new update_master_key()); processMap.put("remove_master_key", new remove_master_key()); processMap.put("get_master_keys", new get_master_keys()); 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("abort_txns", new abort_txns()); 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("compact2", new compact2()); 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()); processMap.put("flushCache", new flushCache()); processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); processMap.put("get_file_metadata", new get_file_metadata()); processMap.put("put_file_metadata", new put_file_metadata()); processMap.put("clear_file_metadata", new clear_file_metadata()); processMap.put("cache_file_metadata", new cache_file_metadata()); processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); return processMap; } public static class getMetaConf<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMetaConf_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setMetaConf_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_database_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_database_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_database_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_databases_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_databases_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_database_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_type_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_type_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_type_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_type_all_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_fields_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_fields_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_schema_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_schema_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_with_environment_context_args> { 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 create_table_with_constraints<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_with_constraints_args> { public create_table_with_constraints() { super("create_table_with_constraints"); } public create_table_with_constraints_args getEmptyArgsInstance() { return new create_table_with_constraints_args(); } protected boolean isOneway() { return false; } public create_table_with_constraints_result getResult(I iface, create_table_with_constraints_args args) throws org.apache.thrift.TException { create_table_with_constraints_result result = new create_table_with_constraints_result(); try { iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys); } 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_constraint<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_constraint_args> { public drop_constraint() { super("drop_constraint"); } public drop_constraint_args getEmptyArgsInstance() { return new drop_constraint_args(); } protected boolean isOneway() { return false; } public drop_constraint_result getResult(I iface, drop_constraint_args args) throws org.apache.thrift.TException { drop_constraint_result result = new drop_constraint_result(); try { iface.drop_constraint(args.req); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o3) { result.o3 = o3; } return result; } } public static class add_primary_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_primary_key_args> { public add_primary_key() { super("add_primary_key"); } public add_primary_key_args getEmptyArgsInstance() { return new add_primary_key_args(); } protected boolean isOneway() { return false; } public add_primary_key_result getResult(I iface, add_primary_key_args args) throws org.apache.thrift.TException { add_primary_key_result result = new add_primary_key_result(); try { iface.add_primary_key(args.req); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class add_foreign_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_foreign_key_args> { public add_foreign_key() { super("add_foreign_key"); } public add_foreign_key_args getEmptyArgsInstance() { return new add_foreign_key_args(); } protected boolean isOneway() { return false; } public add_foreign_key_result getResult(I iface, add_foreign_key_args args) throws org.apache.thrift.TException { add_foreign_key_result result = new add_foreign_key_result(); try { iface.add_foreign_key(args.req); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class drop_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_table_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_table_with_environment_context_args> { 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 truncate_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncate_table_args> { public truncate_table() { super("truncate_table"); } public truncate_table_args getEmptyArgsInstance() { return new truncate_table_args(); } protected boolean isOneway() { return false; } public truncate_table_result getResult(I iface, truncate_table_args args) throws org.apache.thrift.TException { truncate_table_result result = new truncate_table_result(); try { iface.truncate_table(args.dbName, args.tableName, args.partNames); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_args> { 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_tables_by_type<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_by_type_args> { public get_tables_by_type() { super("get_tables_by_type"); } public get_tables_by_type_args getEmptyArgsInstance() { return new get_tables_by_type_args(); } protected boolean isOneway() { return false; } public get_tables_by_type_result getResult(I iface, get_tables_by_type_args args) throws org.apache.thrift.TException { get_tables_by_type_result result = new get_tables_by_type_result(); try { result.success = iface.get_tables_by_type(args.db_name, args.pattern, args.tableType); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_table_meta<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_meta_args> { public get_table_meta() { super("get_table_meta"); } public get_table_meta_args getEmptyArgsInstance() { return new get_table_meta_args(); } protected boolean isOneway() { return false; } public get_table_meta_result getResult(I iface, get_table_meta_args args) throws org.apache.thrift.TException { get_table_meta_result result = new get_table_meta_result(); try { result.success = iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class get_all_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_tables_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_objects_by_name_args> { 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(); result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); return result; } } public static class get_table_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_req_args> { public get_table_req() { super("get_table_req"); } public get_table_req_args getEmptyArgsInstance() { return new get_table_req_args(); } protected boolean isOneway() { return false; } public get_table_req_result getResult(I iface, get_table_req_args args) throws org.apache.thrift.TException { get_table_req_result result = new get_table_req_result(); try { result.success = iface.get_table_req(args.req); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_table_objects_by_name_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_objects_by_name_req_args> { public get_table_objects_by_name_req() { super("get_table_objects_by_name_req"); } public get_table_objects_by_name_req_args getEmptyArgsInstance() { return new get_table_objects_by_name_req_args(); } protected boolean isOneway() { return false; } public get_table_objects_by_name_req_result getResult(I iface, get_table_objects_by_name_req_args args) throws org.apache.thrift.TException { get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); try { result.success = iface.get_table_objects_by_name_req(args.req); } 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_names_by_filter_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_table_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_table_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_table_with_cascade_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partition_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partitions_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partitions_pspec_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partitions_req_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_partition_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_partition_by_name_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_partition_by_name_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partition_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partition_by_name_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partition_by_name_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partitions_req_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exchange_partition_args> { 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 exchange_partitions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exchange_partitions_args> { public exchange_partitions() { super("exchange_partitions"); } public exchange_partitions_args getEmptyArgsInstance() { return new exchange_partitions_args(); } protected boolean isOneway() { return false; } public exchange_partitions_result getResult(I iface, exchange_partitions_args args) throws org.apache.thrift.TException { exchange_partitions_result result = new exchange_partitions_result(); try { result.success = iface.exchange_partitions(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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_with_auth_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_by_name_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_with_auth_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_pspec_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_names_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_ps_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_ps_with_auth_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_names_ps_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_by_filter_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_part_specs_by_filter_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_by_expr_args> { 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_num_partitions_by_filter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_num_partitions_by_filter_args> { public get_num_partitions_by_filter() { super("get_num_partitions_by_filter"); } public get_num_partitions_by_filter_args getEmptyArgsInstance() { return new get_num_partitions_by_filter_args(); } protected boolean isOneway() { return false; } public get_num_partitions_by_filter_result getResult(I iface, get_num_partitions_by_filter_args args) throws org.apache.thrift.TException { get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); try { result.success = iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_partitions_by_names<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_by_names_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partitions_args> { 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_partitions_with_environment_context<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partitions_with_environment_context_args> { public alter_partitions_with_environment_context() { super("alter_partitions_with_environment_context"); } public alter_partitions_with_environment_context_args getEmptyArgsInstance() { return new alter_partitions_with_environment_context_args(); } protected boolean isOneway() { return false; } public alter_partitions_with_environment_context_result getResult(I iface, alter_partitions_with_environment_context_args args) throws org.apache.thrift.TException { alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); try { iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context); } catch (InvalidOperationException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class alter_partition_with_environment_context<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partition_with_environment_context_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_partition_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partition_name_has_valid_characters_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_config_value_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partition_name_to_vals_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partition_name_to_spec_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPartitionForEvent_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isPartitionMarkedForEvent_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_index_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_index_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_index_by_name_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_index_by_name_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_indexes_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_index_names_args> { 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 get_primary_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_primary_keys_args> { public get_primary_keys() { super("get_primary_keys"); } public get_primary_keys_args getEmptyArgsInstance() { return new get_primary_keys_args(); } protected boolean isOneway() { return false; } public get_primary_keys_result getResult(I iface, get_primary_keys_args args) throws org.apache.thrift.TException { get_primary_keys_result result = new get_primary_keys_result(); try { result.success = iface.get_primary_keys(args.request); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class get_foreign_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_foreign_keys_args> { public get_foreign_keys() { super("get_foreign_keys"); } public get_foreign_keys_args getEmptyArgsInstance() { return new get_foreign_keys_args(); } protected boolean isOneway() { return false; } public get_foreign_keys_result getResult(I iface, get_foreign_keys_args args) throws org.apache.thrift.TException { get_foreign_keys_result result = new get_foreign_keys_result(); try { result.success = iface.get_foreign_keys(args.request); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { result.o2 = o2; } return result; } } public static class update_table_column_statistics<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_table_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_partition_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_statistics_req_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_statistics_req_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_aggr_stats_for_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_aggr_stats_for_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_partition_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_table_column_statistics_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_function_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_function_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_function_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_functions_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_function_args> { 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 get_all_functions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_functions_args> { public get_all_functions() { super("get_all_functions"); } public get_all_functions_args getEmptyArgsInstance() { return new get_all_functions_args(); } protected boolean isOneway() { return false; } public get_all_functions_result getResult(I iface, get_all_functions_args args) throws org.apache.thrift.TException { get_all_functions_result result = new get_all_functions_result(); try { result.success = iface.get_all_functions(); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class create_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_role_names_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revoke_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_roles_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_revoke_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_principals_in_role_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_role_grants_for_principal_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_privilege_set_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_privileges_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_privileges_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revoke_privileges_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_revoke_privileges_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_ugi_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_delegation_token_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, renew_delegation_token_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancel_delegation_token_args> { 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 add_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_token_args> { public add_token() { super("add_token"); } public add_token_args getEmptyArgsInstance() { return new add_token_args(); } protected boolean isOneway() { return false; } public add_token_result getResult(I iface, add_token_args args) throws org.apache.thrift.TException { add_token_result result = new add_token_result(); result.success = iface.add_token(args.token_identifier, args.delegation_token); result.setSuccessIsSet(true); return result; } } public static class remove_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_token_args> { public remove_token() { super("remove_token"); } public remove_token_args getEmptyArgsInstance() { return new remove_token_args(); } protected boolean isOneway() { return false; } public remove_token_result getResult(I iface, remove_token_args args) throws org.apache.thrift.TException { remove_token_result result = new remove_token_result(); result.success = iface.remove_token(args.token_identifier); result.setSuccessIsSet(true); return result; } } public static class get_token<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_token_args> { public get_token() { super("get_token"); } public get_token_args getEmptyArgsInstance() { return new get_token_args(); } protected boolean isOneway() { return false; } public get_token_result getResult(I iface, get_token_args args) throws org.apache.thrift.TException { get_token_result result = new get_token_result(); result.success = iface.get_token(args.token_identifier); return result; } } public static class get_all_token_identifiers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_all_token_identifiers_args> { public get_all_token_identifiers() { super("get_all_token_identifiers"); } public get_all_token_identifiers_args getEmptyArgsInstance() { return new get_all_token_identifiers_args(); } protected boolean isOneway() { return false; } public get_all_token_identifiers_result getResult(I iface, get_all_token_identifiers_args args) throws org.apache.thrift.TException { get_all_token_identifiers_result result = new get_all_token_identifiers_result(); result.success = iface.get_all_token_identifiers(); return result; } } public static class add_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_master_key_args> { public add_master_key() { super("add_master_key"); } public add_master_key_args getEmptyArgsInstance() { return new add_master_key_args(); } protected boolean isOneway() { return false; } public add_master_key_result getResult(I iface, add_master_key_args args) throws org.apache.thrift.TException { add_master_key_result result = new add_master_key_result(); try { result.success = iface.add_master_key(args.key); result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } return result; } } public static class update_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_master_key_args> { public update_master_key() { super("update_master_key"); } public update_master_key_args getEmptyArgsInstance() { return new update_master_key_args(); } protected boolean isOneway() { return false; } public update_master_key_result getResult(I iface, update_master_key_args args) throws org.apache.thrift.TException { update_master_key_result result = new update_master_key_result(); try { iface.update_master_key(args.seq_number, args.key); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { result.o2 = o2; } return result; } } public static class remove_master_key<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_master_key_args> { public remove_master_key() { super("remove_master_key"); } public remove_master_key_args getEmptyArgsInstance() { return new remove_master_key_args(); } protected boolean isOneway() { return false; } public remove_master_key_result getResult(I iface, remove_master_key_args args) throws org.apache.thrift.TException { remove_master_key_result result = new remove_master_key_result(); result.success = iface.remove_master_key(args.key_seq); result.setSuccessIsSet(true); return result; } } public static class get_master_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_master_keys_args> { public get_master_keys() { super("get_master_keys"); } public get_master_keys_args getEmptyArgsInstance() { return new get_master_keys_args(); } protected boolean isOneway() { return false; } public get_master_keys_result getResult(I iface, get_master_keys_args args) throws org.apache.thrift.TException { get_master_keys_result result = new get_master_keys_result(); result.success = iface.get_master_keys(); return result; } } public static class get_open_txns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_open_txns_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_open_txns_info_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, open_txns_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abort_txn_args> { 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 abort_txns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abort_txns_args> { public abort_txns() { super("abort_txns"); } public abort_txns_args getEmptyArgsInstance() { return new abort_txns_args(); } protected boolean isOneway() { return false; } public abort_txns_result getResult(I iface, abort_txns_args args) throws org.apache.thrift.TException { abort_txns_result result = new abort_txns_result(); try { iface.abort_txns(args.rqst); } catch (NoSuchTxnException o1) { result.o1 = o1; } return result; } } public static class commit_txn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commit_txn_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, lock_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, check_lock_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unlock_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, show_locks_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, heartbeat_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, heartbeat_txn_range_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, compact_args> { 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 compact2<I extends Iface> extends org.apache.thrift.ProcessFunction<I, compact2_args> { public compact2() { super("compact2"); } public compact2_args getEmptyArgsInstance() { return new compact2_args(); } protected boolean isOneway() { return false; } public compact2_result getResult(I iface, compact2_args args) throws org.apache.thrift.TException { compact2_result result = new compact2_result(); result.success = iface.compact2(args.rqst); return result; } } public static class show_compact<I extends Iface> extends org.apache.thrift.ProcessFunction<I, show_compact_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_dynamic_partitions_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_next_notification_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_current_notificationEventId_args> { 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fire_listener_event_args> { 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 flushCache<I extends Iface> extends org.apache.thrift.ProcessFunction<I, flushCache_args> { public flushCache() { super("flushCache"); } public flushCache_args getEmptyArgsInstance() { return new flushCache_args(); } protected boolean isOneway() { return false; } public flushCache_result getResult(I iface, flushCache_args args) throws org.apache.thrift.TException { flushCache_result result = new flushCache_result(); iface.flushCache(); return result; } } public static class get_file_metadata_by_expr<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_file_metadata_by_expr_args> { public get_file_metadata_by_expr() { super("get_file_metadata_by_expr"); } public get_file_metadata_by_expr_args getEmptyArgsInstance() { return new get_file_metadata_by_expr_args(); } protected boolean isOneway() { return false; } public get_file_metadata_by_expr_result getResult(I iface, get_file_metadata_by_expr_args args) throws org.apache.thrift.TException { get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); result.success = iface.get_file_metadata_by_expr(args.req); return result; } } public static class get_file_metadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_file_metadata_args> { public get_file_metadata() { super("get_file_metadata"); } public get_file_metadata_args getEmptyArgsInstance() { return new get_file_metadata_args(); } protected boolean isOneway() { return false; } public get_file_metadata_result getResult(I iface, get_file_metadata_args args) throws org.apache.thrift.TException { get_file_metadata_result result = new get_file_metadata_result(); result.success = iface.get_file_metadata(args.req); return result; } } public static class put_file_metadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, put_file_metadata_args> { public put_file_metadata() { super("put_file_metadata"); } public put_file_metadata_args getEmptyArgsInstance() { return new put_file_metadata_args(); } protected boolean isOneway() { return false; } public put_file_metadata_result getResult(I iface, put_file_metadata_args args) throws org.apache.thrift.TException { put_file_metadata_result result = new put_file_metadata_result(); result.success = iface.put_file_metadata(args.req); return result; } } public static class clear_file_metadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clear_file_metadata_args> { public clear_file_metadata() { super("clear_file_metadata"); } public clear_file_metadata_args getEmptyArgsInstance() { return new clear_file_metadata_args(); } protected boolean isOneway() { return false; } public clear_file_metadata_result getResult(I iface, clear_file_metadata_args args) throws org.apache.thrift.TException { clear_file_metadata_result result = new clear_file_metadata_result(); result.success = iface.clear_file_metadata(args.req); return result; } } public static class cache_file_metadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cache_file_metadata_args> { public cache_file_metadata() { super("cache_file_metadata"); } public cache_file_metadata_args getEmptyArgsInstance() { return new cache_file_metadata_args(); } protected boolean isOneway() { return false; } public cache_file_metadata_result getResult(I iface, cache_file_metadata_args args) throws org.apache.thrift.TException { cache_file_metadata_result result = new cache_file_metadata_result(); result.success = iface.cache_file_metadata(args.req); return result; } } public static class get_metastore_db_uuid<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_metastore_db_uuid_args> { public get_metastore_db_uuid() { super("get_metastore_db_uuid"); } public get_metastore_db_uuid_args getEmptyArgsInstance() { return new get_metastore_db_uuid_args(); } protected boolean isOneway() { return false; } public get_metastore_db_uuid_result getResult(I iface, get_metastore_db_uuid_args args) throws org.apache.thrift.TException { get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); try { result.success = iface.get_metastore_db_uuid(); } catch (MetaException o1) { result.o1 = o1; } return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends com.facebook.fb303.FacebookService.AsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> 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("create_table_with_constraints", new create_table_with_constraints()); processMap.put("drop_constraint", new drop_constraint()); processMap.put("add_primary_key", new add_primary_key()); processMap.put("add_foreign_key", new add_foreign_key()); processMap.put("drop_table", new drop_table()); processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); processMap.put("truncate_table", new truncate_table()); processMap.put("get_tables", new get_tables()); processMap.put("get_tables_by_type", new get_tables_by_type()); processMap.put("get_table_meta", new get_table_meta()); 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_req", new get_table_req()); processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); 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("exchange_partitions", new exchange_partitions()); 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_num_partitions_by_filter", new get_num_partitions_by_filter()); 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_partitions_with_environment_context", new alter_partitions_with_environment_context()); 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("get_primary_keys", new get_primary_keys()); processMap.put("get_foreign_keys", new get_foreign_keys()); 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("get_all_functions", new get_all_functions()); 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("add_token", new add_token()); processMap.put("remove_token", new remove_token()); processMap.put("get_token", new get_token()); processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); processMap.put("add_master_key", new add_master_key()); processMap.put("update_master_key", new update_master_key()); processMap.put("remove_master_key", new remove_master_key()); processMap.put("get_master_keys", new get_master_keys()); 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("abort_txns", new abort_txns()); 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("compact2", new compact2()); 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()); processMap.put("flushCache", new flushCache()); processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); processMap.put("get_file_metadata", new get_file_metadata()); processMap.put("put_file_metadata", new put_file_metadata()); processMap.put("clear_file_metadata", new clear_file_metadata()); processMap.put("cache_file_metadata", new cache_file_metadata()); processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); return processMap; } public static class getMetaConf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getMetaConf_args, String> { public getMetaConf() { super("getMetaConf"); } public getMetaConf_args getEmptyArgsInstance() { return new getMetaConf_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { getMetaConf_result result = new getMetaConf_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getMetaConf_result result = new getMetaConf_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.getMetaConf(args.key,resultHandler); } } public static class setMetaConf<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setMetaConf_args, Void> { public setMetaConf() { super("setMetaConf"); } public setMetaConf_args getEmptyArgsInstance() { return new setMetaConf_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { setMetaConf_result result = new setMetaConf_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; setMetaConf_result result = new setMetaConf_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, setMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.setMetaConf(args.key, args.value,resultHandler); } } public static class create_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_database_args, Void> { public create_database() { super("create_database"); } public create_database_args getEmptyArgsInstance() { return new create_database_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_database_result result = new create_database_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_database_result result = new create_database_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.create_database(args.database,resultHandler); } } public static class get_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_database_args, Database> { public get_database() { super("get_database"); } public get_database_args getEmptyArgsInstance() { return new get_database_args(); } public AsyncMethodCallback<Database> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Database>() { public void onComplete(Database o) { get_database_result result = new get_database_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_database_result result = new get_database_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_database_args args, org.apache.thrift.async.AsyncMethodCallback<Database> resultHandler) throws TException { iface.get_database(args.name,resultHandler); } } public static class drop_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_database_args, Void> { public drop_database() { super("drop_database"); } public drop_database_args getEmptyArgsInstance() { return new drop_database_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { drop_database_result result = new drop_database_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_database_result result = new drop_database_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidOperationException) { result.o2 = (InvalidOperationException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.drop_database(args.name, args.deleteData, args.cascade,resultHandler); } } public static class get_databases<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_databases_args, List<String>> { public get_databases() { super("get_databases"); } public get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_databases_result result = new get_databases_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_databases_result result = new get_databases_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_databases_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_databases(args.pattern,resultHandler); } } public static class get_all_databases<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_databases_args, List<String>> { public get_all_databases() { super("get_all_databases"); } public get_all_databases_args getEmptyArgsInstance() { return new get_all_databases_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_all_databases_result result = new get_all_databases_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_all_databases_result result = new get_all_databases_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_databases_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_all_databases(resultHandler); } } public static class alter_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_database_args, Void> { public alter_database() { super("alter_database"); } public alter_database_args getEmptyArgsInstance() { return new alter_database_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_database_result result = new alter_database_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_database_result result = new alter_database_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_database(args.dbname, args.db,resultHandler); } } public static class get_type<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_type_args, Type> { public get_type() { super("get_type"); } public get_type_args getEmptyArgsInstance() { return new get_type_args(); } public AsyncMethodCallback<Type> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Type>() { public void onComplete(Type o) { get_type_result result = new get_type_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_type_result result = new get_type_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_type_args args, org.apache.thrift.async.AsyncMethodCallback<Type> resultHandler) throws TException { iface.get_type(args.name,resultHandler); } } public static class create_type<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_type_args, Boolean> { public create_type() { super("create_type"); } public create_type_args getEmptyArgsInstance() { return new create_type_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { create_type_result result = new create_type_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_type_result result = new create_type_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_type_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.create_type(args.type,resultHandler); } } public static class drop_type<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_type_args, Boolean> { public drop_type() { super("drop_type"); } public drop_type_args getEmptyArgsInstance() { return new drop_type_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_type_result result = new drop_type_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_type_result result = new drop_type_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_type_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_type(args.type,resultHandler); } } public static class get_type_all<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_type_all_args, Map<String,Type>> { public get_type_all() { super("get_type_all"); } public get_type_all_args getEmptyArgsInstance() { return new get_type_all_args(); } public AsyncMethodCallback<Map<String,Type>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Map<String,Type>>() { public void onComplete(Map<String,Type> o) { get_type_all_result result = new get_type_all_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_type_all_result result = new get_type_all_result(); if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_type_all_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,Type>> resultHandler) throws TException { iface.get_type_all(args.name,resultHandler); } } public static class get_fields<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_fields_args, List<FieldSchema>> { public get_fields() { super("get_fields"); } public get_fields_args getEmptyArgsInstance() { return new get_fields_args(); } public AsyncMethodCallback<List<FieldSchema>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<FieldSchema>>() { public void onComplete(List<FieldSchema> o) { get_fields_result result = new get_fields_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_fields_result result = new get_fields_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o2 = (UnknownTableException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_fields_args args, org.apache.thrift.async.AsyncMethodCallback<List<FieldSchema>> resultHandler) throws TException { iface.get_fields(args.db_name, args.table_name,resultHandler); } } public static class get_fields_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_fields_with_environment_context_args, List<FieldSchema>> { 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(); } public AsyncMethodCallback<List<FieldSchema>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<FieldSchema>>() { public void onComplete(List<FieldSchema> o) { get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o2 = (UnknownTableException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_fields_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<List<FieldSchema>> resultHandler) throws TException { iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); } } public static class get_schema<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_schema_args, List<FieldSchema>> { public get_schema() { super("get_schema"); } public get_schema_args getEmptyArgsInstance() { return new get_schema_args(); } public AsyncMethodCallback<List<FieldSchema>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<FieldSchema>>() { public void onComplete(List<FieldSchema> o) { get_schema_result result = new get_schema_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_schema_result result = new get_schema_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o2 = (UnknownTableException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_schema_args args, org.apache.thrift.async.AsyncMethodCallback<List<FieldSchema>> resultHandler) throws TException { iface.get_schema(args.db_name, args.table_name,resultHandler); } } public static class get_schema_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_schema_with_environment_context_args, List<FieldSchema>> { 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(); } public AsyncMethodCallback<List<FieldSchema>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<FieldSchema>>() { public void onComplete(List<FieldSchema> o) { get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o2 = (UnknownTableException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_schema_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<List<FieldSchema>> resultHandler) throws TException { iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); } } public static class create_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_table_args, Void> { public create_table() { super("create_table"); } public create_table_args getEmptyArgsInstance() { return new create_table_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_table_result result = new create_table_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_table_result result = new create_table_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o4 = (NoSuchObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.create_table(args.tbl,resultHandler); } } public static class create_table_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_table_with_environment_context_args, Void> { 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(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_table_with_environment_context_result result = new create_table_with_environment_context_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_table_with_environment_context_result result = new create_table_with_environment_context_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o4 = (NoSuchObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.create_table_with_environment_context(args.tbl, args.environment_context,resultHandler); } } public static class create_table_with_constraints<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_table_with_constraints_args, Void> { public create_table_with_constraints() { super("create_table_with_constraints"); } public create_table_with_constraints_args getEmptyArgsInstance() { return new create_table_with_constraints_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_table_with_constraints_result result = new create_table_with_constraints_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_table_with_constraints_result result = new create_table_with_constraints_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o4 = (NoSuchObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_table_with_constraints_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys,resultHandler); } } public static class drop_constraint<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_constraint_args, Void> { public drop_constraint() { super("drop_constraint"); } public drop_constraint_args getEmptyArgsInstance() { return new drop_constraint_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { drop_constraint_result result = new drop_constraint_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_constraint_result result = new drop_constraint_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_constraint_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.drop_constraint(args.req,resultHandler); } } public static class add_primary_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_primary_key_args, Void> { public add_primary_key() { super("add_primary_key"); } public add_primary_key_args getEmptyArgsInstance() { return new add_primary_key_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { add_primary_key_result result = new add_primary_key_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_primary_key_result result = new add_primary_key_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_primary_key_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.add_primary_key(args.req,resultHandler); } } public static class add_foreign_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_foreign_key_args, Void> { public add_foreign_key() { super("add_foreign_key"); } public add_foreign_key_args getEmptyArgsInstance() { return new add_foreign_key_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { add_foreign_key_result result = new add_foreign_key_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_foreign_key_result result = new add_foreign_key_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_foreign_key_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.add_foreign_key(args.req,resultHandler); } } public static class drop_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_table_args, Void> { public drop_table() { super("drop_table"); } public drop_table_args getEmptyArgsInstance() { return new drop_table_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { drop_table_result result = new drop_table_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_table_result result = new drop_table_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.drop_table(args.dbname, args.name, args.deleteData,resultHandler); } } public static class drop_table_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_table_with_environment_context_args, Void> { 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(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context,resultHandler); } } public static class truncate_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, truncate_table_args, Void> { public truncate_table() { super("truncate_table"); } public truncate_table_args getEmptyArgsInstance() { return new truncate_table_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { truncate_table_result result = new truncate_table_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; truncate_table_result result = new truncate_table_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, truncate_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.truncate_table(args.dbName, args.tableName, args.partNames,resultHandler); } } public static class get_tables<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_args, List<String>> { public get_tables() { super("get_tables"); } public get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_tables_result result = new get_tables_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_tables_result result = new get_tables_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_tables_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_tables(args.db_name, args.pattern,resultHandler); } } public static class get_tables_by_type<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_by_type_args, List<String>> { public get_tables_by_type() { super("get_tables_by_type"); } public get_tables_by_type_args getEmptyArgsInstance() { return new get_tables_by_type_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_tables_by_type_result result = new get_tables_by_type_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_tables_by_type_result result = new get_tables_by_type_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_tables_by_type_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_tables_by_type(args.db_name, args.pattern, args.tableType,resultHandler); } } public static class get_table_meta<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_meta_args, List<TableMeta>> { public get_table_meta() { super("get_table_meta"); } public get_table_meta_args getEmptyArgsInstance() { return new get_table_meta_args(); } public AsyncMethodCallback<List<TableMeta>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<TableMeta>>() { public void onComplete(List<TableMeta> o) { get_table_meta_result result = new get_table_meta_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_meta_result result = new get_table_meta_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_meta_args args, org.apache.thrift.async.AsyncMethodCallback<List<TableMeta>> resultHandler) throws TException { iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types,resultHandler); } } public static class get_all_tables<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_tables_args, List<String>> { public get_all_tables() { super("get_all_tables"); } public get_all_tables_args getEmptyArgsInstance() { return new get_all_tables_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_all_tables_result result = new get_all_tables_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_all_tables_result result = new get_all_tables_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_tables_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_all_tables(args.db_name,resultHandler); } } public static class get_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_args, Table> { public get_table() { super("get_table"); } public get_table_args getEmptyArgsInstance() { return new get_table_args(); } public AsyncMethodCallback<Table> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Table>() { public void onComplete(Table o) { get_table_result result = new get_table_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_result result = new get_table_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_args args, org.apache.thrift.async.AsyncMethodCallback<Table> resultHandler) throws TException { iface.get_table(args.dbname, args.tbl_name,resultHandler); } } public static class get_table_objects_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_objects_by_name_args, List<Table>> { 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(); } public AsyncMethodCallback<List<Table>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Table>>() { public void onComplete(List<Table> o) { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_objects_by_name_result result = new get_table_objects_by_name_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_objects_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<List<Table>> resultHandler) throws TException { iface.get_table_objects_by_name(args.dbname, args.tbl_names,resultHandler); } } public static class get_table_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_req_args, GetTableResult> { public get_table_req() { super("get_table_req"); } public get_table_req_args getEmptyArgsInstance() { return new get_table_req_args(); } public AsyncMethodCallback<GetTableResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetTableResult>() { public void onComplete(GetTableResult o) { get_table_req_result result = new get_table_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_req_result result = new get_table_req_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_req_args args, org.apache.thrift.async.AsyncMethodCallback<GetTableResult> resultHandler) throws TException { iface.get_table_req(args.req,resultHandler); } } public static class get_table_objects_by_name_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_objects_by_name_req_args, GetTablesResult> { public get_table_objects_by_name_req() { super("get_table_objects_by_name_req"); } public get_table_objects_by_name_req_args getEmptyArgsInstance() { return new get_table_objects_by_name_req_args(); } public AsyncMethodCallback<GetTablesResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetTablesResult>() { public void onComplete(GetTablesResult o) { get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidOperationException) { result.o2 = (InvalidOperationException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_objects_by_name_req_args args, org.apache.thrift.async.AsyncMethodCallback<GetTablesResult> resultHandler) throws TException { iface.get_table_objects_by_name_req(args.req,resultHandler); } } public static class get_table_names_by_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_names_by_filter_args, List<String>> { 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(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_table_names_by_filter_result result = new get_table_names_by_filter_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_names_by_filter_result result = new get_table_names_by_filter_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidOperationException) { result.o2 = (InvalidOperationException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_names_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_table_names_by_filter(args.dbname, args.filter, args.max_tables,resultHandler); } } public static class alter_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_table_args, Void> { public alter_table() { super("alter_table"); } public alter_table_args getEmptyArgsInstance() { return new alter_table_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_table_result result = new alter_table_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_table_result result = new alter_table_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_table_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_table(args.dbname, args.tbl_name, args.new_tbl,resultHandler); } } public static class alter_table_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_table_with_environment_context_args, Void> { 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(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context,resultHandler); } } public static class alter_table_with_cascade<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_table_with_cascade_args, Void> { public alter_table_with_cascade() { super("alter_table_with_cascade"); } public alter_table_with_cascade_args getEmptyArgsInstance() { return new alter_table_with_cascade_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_table_with_cascade_result result = new alter_table_with_cascade_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_table_with_cascade_result result = new alter_table_with_cascade_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_table_with_cascade_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade,resultHandler); } } public static class add_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partition_args, Partition> { public add_partition() { super("add_partition"); } public add_partition_args getEmptyArgsInstance() { return new add_partition_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { add_partition_result result = new add_partition_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_partition_result result = new add_partition_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.add_partition(args.new_part,resultHandler); } } public static class add_partition_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partition_with_environment_context_args, Partition> { 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(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.add_partition_with_environment_context(args.new_part, args.environment_context,resultHandler); } } public static class add_partitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partitions_args, Integer> { public add_partitions() { super("add_partitions"); } public add_partitions_args getEmptyArgsInstance() { return new add_partitions_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { add_partitions_result result = new add_partitions_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_partitions_result result = new add_partitions_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_partitions_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.add_partitions(args.new_parts,resultHandler); } } public static class add_partitions_pspec<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partitions_pspec_args, Integer> { public add_partitions_pspec() { super("add_partitions_pspec"); } public add_partitions_pspec_args getEmptyArgsInstance() { return new add_partitions_pspec_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { add_partitions_pspec_result result = new add_partitions_pspec_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_partitions_pspec_result result = new add_partitions_pspec_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.add_partitions_pspec(args.new_parts,resultHandler); } } public static class append_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_partition_args, Partition> { public append_partition() { super("append_partition"); } public append_partition_args getEmptyArgsInstance() { return new append_partition_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { append_partition_result result = new append_partition_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; append_partition_result result = new append_partition_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, append_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.append_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); } } public static class add_partitions_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partitions_req_args, AddPartitionsResult> { public add_partitions_req() { super("add_partitions_req"); } public add_partitions_req_args getEmptyArgsInstance() { return new add_partitions_req_args(); } public AsyncMethodCallback<AddPartitionsResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<AddPartitionsResult>() { public void onComplete(AddPartitionsResult o) { add_partitions_req_result result = new add_partitions_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_partitions_req_result result = new add_partitions_req_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback<AddPartitionsResult> resultHandler) throws TException { iface.add_partitions_req(args.request,resultHandler); } } public static class append_partition_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_partition_with_environment_context_args, Partition> { 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(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, append_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context,resultHandler); } } public static class append_partition_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_partition_by_name_args, Partition> { public append_partition_by_name() { super("append_partition_by_name"); } public append_partition_by_name_args getEmptyArgsInstance() { return new append_partition_by_name_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { append_partition_by_name_result result = new append_partition_by_name_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; append_partition_by_name_result result = new append_partition_by_name_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, append_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); } } public static class append_partition_by_name_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_partition_by_name_with_environment_context_args, Partition> { 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(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, append_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context,resultHandler); } } public static class drop_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_partition_args, Boolean> { public drop_partition() { super("drop_partition"); } public drop_partition_args getEmptyArgsInstance() { return new drop_partition_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_partition_result result = new drop_partition_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_partition_result result = new drop_partition_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData,resultHandler); } } public static class drop_partition_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_partition_with_environment_context_args, Boolean> { 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(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context,resultHandler); } } public static class drop_partition_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_partition_by_name_args, Boolean> { public drop_partition_by_name() { super("drop_partition_by_name"); } public drop_partition_by_name_args getEmptyArgsInstance() { return new drop_partition_by_name_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_partition_by_name_result result = new drop_partition_by_name_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_partition_by_name_result result = new drop_partition_by_name_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData,resultHandler); } } public static class drop_partition_by_name_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_partition_by_name_with_environment_context_args, Boolean> { 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(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context,resultHandler); } } public static class drop_partitions_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_partitions_req_args, DropPartitionsResult> { public drop_partitions_req() { super("drop_partitions_req"); } public drop_partitions_req_args getEmptyArgsInstance() { return new drop_partitions_req_args(); } public AsyncMethodCallback<DropPartitionsResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<DropPartitionsResult>() { public void onComplete(DropPartitionsResult o) { drop_partitions_req_result result = new drop_partitions_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_partitions_req_result result = new drop_partitions_req_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback<DropPartitionsResult> resultHandler) throws TException { iface.drop_partitions_req(args.req,resultHandler); } } public static class get_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_args, Partition> { public get_partition() { super("get_partition"); } public get_partition_args getEmptyArgsInstance() { return new get_partition_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { get_partition_result result = new get_partition_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_result result = new get_partition_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.get_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); } } public static class exchange_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, exchange_partition_args, Partition> { public exchange_partition() { super("exchange_partition"); } public exchange_partition_args getEmptyArgsInstance() { return new exchange_partition_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { exchange_partition_result result = new exchange_partition_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; exchange_partition_result result = new exchange_partition_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o3 = (InvalidObjectException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, exchange_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); } } public static class exchange_partitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, exchange_partitions_args, List<Partition>> { public exchange_partitions() { super("exchange_partitions"); } public exchange_partitions_args getEmptyArgsInstance() { return new exchange_partitions_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { exchange_partitions_result result = new exchange_partitions_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; exchange_partitions_result result = new exchange_partitions_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o3 = (InvalidObjectException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, exchange_partitions_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); } } public static class get_partition_with_auth<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_with_auth_args, Partition> { public get_partition_with_auth() { super("get_partition_with_auth"); } public get_partition_with_auth_args getEmptyArgsInstance() { return new get_partition_with_auth_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { get_partition_with_auth_result result = new get_partition_with_auth_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_with_auth_result result = new get_partition_with_auth_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names,resultHandler); } } public static class get_partition_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_by_name_args, Partition> { public get_partition_by_name() { super("get_partition_by_name"); } public get_partition_by_name_args getEmptyArgsInstance() { return new get_partition_by_name_args(); } public AsyncMethodCallback<Partition> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Partition>() { public void onComplete(Partition o) { get_partition_by_name_result result = new get_partition_by_name_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_by_name_result result = new get_partition_by_name_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Partition> resultHandler) throws TException { iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); } } public static class get_partitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_args, List<Partition>> { public get_partitions() { super("get_partitions"); } public get_partitions_args getEmptyArgsInstance() { return new get_partitions_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_result result = new get_partitions_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_result result = new get_partitions_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions(args.db_name, args.tbl_name, args.max_parts,resultHandler); } } public static class get_partitions_with_auth<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_with_auth_args, List<Partition>> { public get_partitions_with_auth() { super("get_partitions_with_auth"); } public get_partitions_with_auth_args getEmptyArgsInstance() { return new get_partitions_with_auth_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_with_auth_result result = new get_partitions_with_auth_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_with_auth_result result = new get_partitions_with_auth_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names,resultHandler); } } public static class get_partitions_pspec<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_pspec_args, List<PartitionSpec>> { public get_partitions_pspec() { super("get_partitions_pspec"); } public get_partitions_pspec_args getEmptyArgsInstance() { return new get_partitions_pspec_args(); } public AsyncMethodCallback<List<PartitionSpec>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<PartitionSpec>>() { public void onComplete(List<PartitionSpec> o) { get_partitions_pspec_result result = new get_partitions_pspec_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_pspec_result result = new get_partitions_pspec_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback<List<PartitionSpec>> resultHandler) throws TException { iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts,resultHandler); } } public static class get_partition_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_names_args, List<String>> { public get_partition_names() { super("get_partition_names"); } public get_partition_names_args getEmptyArgsInstance() { return new get_partition_names_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_partition_names_result result = new get_partition_names_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_names_result result = new get_partition_names_result(); if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_names_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts,resultHandler); } } public static class get_partitions_ps<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_ps_args, List<Partition>> { public get_partitions_ps() { super("get_partitions_ps"); } public get_partitions_ps_args getEmptyArgsInstance() { return new get_partitions_ps_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_ps_result result = new get_partitions_ps_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_ps_result result = new get_partitions_ps_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_ps_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); } } public static class get_partitions_ps_with_auth<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_ps_with_auth_args, List<Partition>> { 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(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_ps_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names,resultHandler); } } public static class get_partition_names_ps<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_names_ps_args, List<String>> { public get_partition_names_ps() { super("get_partition_names_ps"); } public get_partition_names_ps_args getEmptyArgsInstance() { return new get_partition_names_ps_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_partition_names_ps_result result = new get_partition_names_ps_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_names_ps_result result = new get_partition_names_ps_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_names_ps_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); } } public static class get_partitions_by_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_by_filter_args, List<Partition>> { public get_partitions_by_filter() { super("get_partitions_by_filter"); } public get_partitions_by_filter_args getEmptyArgsInstance() { return new get_partitions_by_filter_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_by_filter_result result = new get_partitions_by_filter_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_by_filter_result result = new get_partitions_by_filter_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); } } public static class get_part_specs_by_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_part_specs_by_filter_args, List<PartitionSpec>> { 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(); } public AsyncMethodCallback<List<PartitionSpec>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<PartitionSpec>>() { public void onComplete(List<PartitionSpec> o) { get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_part_specs_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback<List<PartitionSpec>> resultHandler) throws TException { iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); } } public static class get_partitions_by_expr<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_by_expr_args, PartitionsByExprResult> { public get_partitions_by_expr() { super("get_partitions_by_expr"); } public get_partitions_by_expr_args getEmptyArgsInstance() { return new get_partitions_by_expr_args(); } public AsyncMethodCallback<PartitionsByExprResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<PartitionsByExprResult>() { public void onComplete(PartitionsByExprResult o) { get_partitions_by_expr_result result = new get_partitions_by_expr_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_by_expr_result result = new get_partitions_by_expr_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback<PartitionsByExprResult> resultHandler) throws TException { iface.get_partitions_by_expr(args.req,resultHandler); } } public static class get_num_partitions_by_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_num_partitions_by_filter_args, Integer> { public get_num_partitions_by_filter() { super("get_num_partitions_by_filter"); } public get_num_partitions_by_filter_args getEmptyArgsInstance() { return new get_num_partitions_by_filter_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_num_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter,resultHandler); } } public static class get_partitions_by_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_by_names_args, List<Partition>> { public get_partitions_by_names() { super("get_partitions_by_names"); } public get_partitions_by_names_args getEmptyArgsInstance() { return new get_partitions_by_names_args(); } public AsyncMethodCallback<List<Partition>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Partition>>() { public void onComplete(List<Partition> o) { get_partitions_by_names_result result = new get_partitions_by_names_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_by_names_result result = new get_partitions_by_names_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_by_names_args args, org.apache.thrift.async.AsyncMethodCallback<List<Partition>> resultHandler) throws TException { iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names,resultHandler); } } public static class alter_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partition_args, Void> { public alter_partition() { super("alter_partition"); } public alter_partition_args getEmptyArgsInstance() { return new alter_partition_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_partition_result result = new alter_partition_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_partition_result result = new alter_partition_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_partition(args.db_name, args.tbl_name, args.new_part,resultHandler); } } public static class alter_partitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partitions_args, Void> { public alter_partitions() { super("alter_partitions"); } public alter_partitions_args getEmptyArgsInstance() { return new alter_partitions_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_partitions_result result = new alter_partitions_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_partitions_result result = new alter_partitions_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_partitions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts,resultHandler); } } public static class alter_partitions_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partitions_with_environment_context_args, Void> { public alter_partitions_with_environment_context() { super("alter_partitions_with_environment_context"); } public alter_partitions_with_environment_context_args getEmptyArgsInstance() { return new alter_partitions_with_environment_context_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_partitions_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context,resultHandler); } } public static class alter_partition_with_environment_context<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partition_with_environment_context_args, Void> { 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(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context,resultHandler); } } public static class rename_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, rename_partition_args, Void> { public rename_partition() { super("rename_partition"); } public rename_partition_args getEmptyArgsInstance() { return new rename_partition_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { rename_partition_result result = new rename_partition_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; rename_partition_result result = new rename_partition_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, rename_partition_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part,resultHandler); } } public static class partition_name_has_valid_characters<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, partition_name_has_valid_characters_args, Boolean> { 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(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, partition_name_has_valid_characters_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception,resultHandler); } } public static class get_config_value<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_config_value_args, String> { public get_config_value() { super("get_config_value"); } public get_config_value_args getEmptyArgsInstance() { return new get_config_value_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { get_config_value_result result = new get_config_value_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_config_value_result result = new get_config_value_result(); if (e instanceof ConfigValSecurityException) { result.o1 = (ConfigValSecurityException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_config_value_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.get_config_value(args.name, args.defaultValue,resultHandler); } } public static class partition_name_to_vals<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, partition_name_to_vals_args, List<String>> { public partition_name_to_vals() { super("partition_name_to_vals"); } public partition_name_to_vals_args getEmptyArgsInstance() { return new partition_name_to_vals_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { partition_name_to_vals_result result = new partition_name_to_vals_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; partition_name_to_vals_result result = new partition_name_to_vals_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, partition_name_to_vals_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.partition_name_to_vals(args.part_name,resultHandler); } } public static class partition_name_to_spec<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, partition_name_to_spec_args, Map<String,String>> { public partition_name_to_spec() { super("partition_name_to_spec"); } public partition_name_to_spec_args getEmptyArgsInstance() { return new partition_name_to_spec_args(); } public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Map<String,String>>() { public void onComplete(Map<String,String> o) { partition_name_to_spec_result result = new partition_name_to_spec_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; partition_name_to_spec_result result = new partition_name_to_spec_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, partition_name_to_spec_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { iface.partition_name_to_spec(args.part_name,resultHandler); } } public static class markPartitionForEvent<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, markPartitionForEvent_args, Void> { public markPartitionForEvent() { super("markPartitionForEvent"); } public markPartitionForEvent_args getEmptyArgsInstance() { return new markPartitionForEvent_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { markPartitionForEvent_result result = new markPartitionForEvent_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; markPartitionForEvent_result result = new markPartitionForEvent_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o4 = (UnknownTableException) e; result.setO4IsSet(true); msg = result; } else if (e instanceof UnknownPartitionException) { result.o5 = (UnknownPartitionException) e; result.setO5IsSet(true); msg = result; } else if (e instanceof InvalidPartitionException) { result.o6 = (InvalidPartitionException) e; result.setO6IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, markPartitionForEvent_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); } } public static class isPartitionMarkedForEvent<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isPartitionMarkedForEvent_args, Boolean> { public isPartitionMarkedForEvent() { super("isPartitionMarkedForEvent"); } public isPartitionMarkedForEvent_args getEmptyArgsInstance() { return new isPartitionMarkedForEvent_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof UnknownDBException) { result.o3 = (UnknownDBException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof UnknownTableException) { result.o4 = (UnknownTableException) e; result.setO4IsSet(true); msg = result; } else if (e instanceof UnknownPartitionException) { result.o5 = (UnknownPartitionException) e; result.setO5IsSet(true); msg = result; } else if (e instanceof InvalidPartitionException) { result.o6 = (InvalidPartitionException) e; result.setO6IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, isPartitionMarkedForEvent_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); } } public static class add_index<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_index_args, Index> { public add_index() { super("add_index"); } public add_index_args getEmptyArgsInstance() { return new add_index_args(); } public AsyncMethodCallback<Index> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Index>() { public void onComplete(Index o) { add_index_result result = new add_index_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_index_result result = new add_index_result(); if (e instanceof InvalidObjectException) { result.o1 = (InvalidObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof AlreadyExistsException) { result.o2 = (AlreadyExistsException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_index_args args, org.apache.thrift.async.AsyncMethodCallback<Index> resultHandler) throws TException { iface.add_index(args.new_index, args.index_table,resultHandler); } } public static class alter_index<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_index_args, Void> { public alter_index() { super("alter_index"); } public alter_index_args getEmptyArgsInstance() { return new alter_index_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_index_result result = new alter_index_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_index_result result = new alter_index_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_index_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx,resultHandler); } } public static class drop_index_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_index_by_name_args, Boolean> { public drop_index_by_name() { super("drop_index_by_name"); } public drop_index_by_name_args getEmptyArgsInstance() { return new drop_index_by_name_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_index_by_name_result result = new drop_index_by_name_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_index_by_name_result result = new drop_index_by_name_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData,resultHandler); } } public static class get_index_by_name<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_index_by_name_args, Index> { public get_index_by_name() { super("get_index_by_name"); } public get_index_by_name_args getEmptyArgsInstance() { return new get_index_by_name_args(); } public AsyncMethodCallback<Index> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Index>() { public void onComplete(Index o) { get_index_by_name_result result = new get_index_by_name_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_index_by_name_result result = new get_index_by_name_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback<Index> resultHandler) throws TException { iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name,resultHandler); } } public static class get_indexes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_indexes_args, List<Index>> { public get_indexes() { super("get_indexes"); } public get_indexes_args getEmptyArgsInstance() { return new get_indexes_args(); } public AsyncMethodCallback<List<Index>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Index>>() { public void onComplete(List<Index> o) { get_indexes_result result = new get_indexes_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_indexes_result result = new get_indexes_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_indexes_args args, org.apache.thrift.async.AsyncMethodCallback<List<Index>> resultHandler) throws TException { iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes,resultHandler); } } public static class get_index_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_index_names_args, List<String>> { public get_index_names() { super("get_index_names"); } public get_index_names_args getEmptyArgsInstance() { return new get_index_names_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_index_names_result result = new get_index_names_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_index_names_result result = new get_index_names_result(); if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_index_names_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes,resultHandler); } } public static class get_primary_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_primary_keys_args, PrimaryKeysResponse> { public get_primary_keys() { super("get_primary_keys"); } public get_primary_keys_args getEmptyArgsInstance() { return new get_primary_keys_args(); } public AsyncMethodCallback<PrimaryKeysResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<PrimaryKeysResponse>() { public void onComplete(PrimaryKeysResponse o) { get_primary_keys_result result = new get_primary_keys_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_primary_keys_result result = new get_primary_keys_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_primary_keys_args args, org.apache.thrift.async.AsyncMethodCallback<PrimaryKeysResponse> resultHandler) throws TException { iface.get_primary_keys(args.request,resultHandler); } } public static class get_foreign_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_foreign_keys_args, ForeignKeysResponse> { public get_foreign_keys() { super("get_foreign_keys"); } public get_foreign_keys_args getEmptyArgsInstance() { return new get_foreign_keys_args(); } public AsyncMethodCallback<ForeignKeysResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ForeignKeysResponse>() { public void onComplete(ForeignKeysResponse o) { get_foreign_keys_result result = new get_foreign_keys_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_foreign_keys_result result = new get_foreign_keys_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_foreign_keys_args args, org.apache.thrift.async.AsyncMethodCallback<ForeignKeysResponse> resultHandler) throws TException { iface.get_foreign_keys(args.request,resultHandler); } } public static class update_table_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_table_column_statistics_args, Boolean> { public update_table_column_statistics() { super("update_table_column_statistics"); } public update_table_column_statistics_args getEmptyArgsInstance() { return new update_table_column_statistics_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { update_table_column_statistics_result result = new update_table_column_statistics_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; update_table_column_statistics_result result = new update_table_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, update_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.update_table_column_statistics(args.stats_obj,resultHandler); } } public static class update_partition_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_partition_column_statistics_args, Boolean> { public update_partition_column_statistics() { super("update_partition_column_statistics"); } public update_partition_column_statistics_args getEmptyArgsInstance() { return new update_partition_column_statistics_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { update_partition_column_statistics_result result = new update_partition_column_statistics_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; update_partition_column_statistics_result result = new update_partition_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, update_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.update_partition_column_statistics(args.stats_obj,resultHandler); } } public static class get_table_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_column_statistics_args, ColumnStatistics> { public get_table_column_statistics() { super("get_table_column_statistics"); } public get_table_column_statistics_args getEmptyArgsInstance() { return new get_table_column_statistics_args(); } public AsyncMethodCallback<ColumnStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ColumnStatistics>() { public void onComplete(ColumnStatistics o) { get_table_column_statistics_result result = new get_table_column_statistics_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_column_statistics_result result = new get_table_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o3 = (InvalidInputException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o4 = (InvalidObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<ColumnStatistics> resultHandler) throws TException { iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); } } public static class get_partition_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partition_column_statistics_args, ColumnStatistics> { public get_partition_column_statistics() { super("get_partition_column_statistics"); } public get_partition_column_statistics_args getEmptyArgsInstance() { return new get_partition_column_statistics_args(); } public AsyncMethodCallback<ColumnStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ColumnStatistics>() { public void onComplete(ColumnStatistics o) { get_partition_column_statistics_result result = new get_partition_column_statistics_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partition_column_statistics_result result = new get_partition_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o3 = (InvalidInputException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o4 = (InvalidObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<ColumnStatistics> resultHandler) throws TException { iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); } } public static class get_table_statistics_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_statistics_req_args, TableStatsResult> { public get_table_statistics_req() { super("get_table_statistics_req"); } public get_table_statistics_req_args getEmptyArgsInstance() { return new get_table_statistics_req_args(); } public AsyncMethodCallback<TableStatsResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<TableStatsResult>() { public void onComplete(TableStatsResult o) { get_table_statistics_req_result result = new get_table_statistics_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_table_statistics_req_result result = new get_table_statistics_req_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_table_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback<TableStatsResult> resultHandler) throws TException { iface.get_table_statistics_req(args.request,resultHandler); } } public static class get_partitions_statistics_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_partitions_statistics_req_args, PartitionsStatsResult> { public get_partitions_statistics_req() { super("get_partitions_statistics_req"); } public get_partitions_statistics_req_args getEmptyArgsInstance() { return new get_partitions_statistics_req_args(); } public AsyncMethodCallback<PartitionsStatsResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<PartitionsStatsResult>() { public void onComplete(PartitionsStatsResult o) { get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_partitions_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback<PartitionsStatsResult> resultHandler) throws TException { iface.get_partitions_statistics_req(args.request,resultHandler); } } public static class get_aggr_stats_for<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_aggr_stats_for_args, AggrStats> { public get_aggr_stats_for() { super("get_aggr_stats_for"); } public get_aggr_stats_for_args getEmptyArgsInstance() { return new get_aggr_stats_for_args(); } public AsyncMethodCallback<AggrStats> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<AggrStats>() { public void onComplete(AggrStats o) { get_aggr_stats_for_result result = new get_aggr_stats_for_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_aggr_stats_for_result result = new get_aggr_stats_for_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback<AggrStats> resultHandler) throws TException { iface.get_aggr_stats_for(args.request,resultHandler); } } public static class set_aggr_stats_for<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_aggr_stats_for_args, Boolean> { public set_aggr_stats_for() { super("set_aggr_stats_for"); } public set_aggr_stats_for_args getEmptyArgsInstance() { return new set_aggr_stats_for_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { set_aggr_stats_for_result result = new set_aggr_stats_for_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; set_aggr_stats_for_result result = new set_aggr_stats_for_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, set_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.set_aggr_stats_for(args.request,resultHandler); } } public static class delete_partition_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_partition_column_statistics_args, Boolean> { public delete_partition_column_statistics() { super("delete_partition_column_statistics"); } public delete_partition_column_statistics_args getEmptyArgsInstance() { return new delete_partition_column_statistics_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o3 = (InvalidObjectException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); } } public static class delete_table_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_table_column_statistics_args, Boolean> { public delete_table_column_statistics() { super("delete_table_column_statistics"); } public delete_table_column_statistics_args getEmptyArgsInstance() { return new delete_table_column_statistics_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { delete_table_column_statistics_result result = new delete_table_column_statistics_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; delete_table_column_statistics_result result = new delete_table_column_statistics_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o3 = (InvalidObjectException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof InvalidInputException) { result.o4 = (InvalidInputException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); } } public static class create_function<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_function_args, Void> { public create_function() { super("create_function"); } public create_function_args getEmptyArgsInstance() { return new create_function_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { create_function_result result = new create_function_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_function_result result = new create_function_result(); if (e instanceof AlreadyExistsException) { result.o1 = (AlreadyExistsException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof InvalidObjectException) { result.o2 = (InvalidObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o4 = (NoSuchObjectException) e; result.setO4IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_function_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.create_function(args.func,resultHandler); } } public static class drop_function<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_function_args, Void> { public drop_function() { super("drop_function"); } public drop_function_args getEmptyArgsInstance() { return new drop_function_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { drop_function_result result = new drop_function_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_function_result result = new drop_function_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o3 = (MetaException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_function_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.drop_function(args.dbName, args.funcName,resultHandler); } } public static class alter_function<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_function_args, Void> { public alter_function() { super("alter_function"); } public alter_function_args getEmptyArgsInstance() { return new alter_function_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { alter_function_result result = new alter_function_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; alter_function_result result = new alter_function_result(); if (e instanceof InvalidOperationException) { result.o1 = (InvalidOperationException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, alter_function_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.alter_function(args.dbName, args.funcName, args.newFunc,resultHandler); } } public static class get_functions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_functions_args, List<String>> { public get_functions() { super("get_functions"); } public get_functions_args getEmptyArgsInstance() { return new get_functions_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_functions_result result = new get_functions_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_functions_result result = new get_functions_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_functions_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_functions(args.dbName, args.pattern,resultHandler); } } public static class get_function<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_function_args, Function> { public get_function() { super("get_function"); } public get_function_args getEmptyArgsInstance() { return new get_function_args(); } public AsyncMethodCallback<Function> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Function>() { public void onComplete(Function o) { get_function_result result = new get_function_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_function_result result = new get_function_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_function_args args, org.apache.thrift.async.AsyncMethodCallback<Function> resultHandler) throws TException { iface.get_function(args.dbName, args.funcName,resultHandler); } } public static class get_all_functions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_functions_args, GetAllFunctionsResponse> { public get_all_functions() { super("get_all_functions"); } public get_all_functions_args getEmptyArgsInstance() { return new get_all_functions_args(); } public AsyncMethodCallback<GetAllFunctionsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetAllFunctionsResponse>() { public void onComplete(GetAllFunctionsResponse o) { get_all_functions_result result = new get_all_functions_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_all_functions_result result = new get_all_functions_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_functions_args args, org.apache.thrift.async.AsyncMethodCallback<GetAllFunctionsResponse> resultHandler) throws TException { iface.get_all_functions(resultHandler); } } public static class create_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_role_args, Boolean> { public create_role() { super("create_role"); } public create_role_args getEmptyArgsInstance() { return new create_role_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { create_role_result result = new create_role_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; create_role_result result = new create_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, create_role_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.create_role(args.role,resultHandler); } } public static class drop_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_role_args, Boolean> { public drop_role() { super("drop_role"); } public drop_role_args getEmptyArgsInstance() { return new drop_role_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { drop_role_result result = new drop_role_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; drop_role_result result = new drop_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, drop_role_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.drop_role(args.role_name,resultHandler); } } public static class get_role_names<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_role_names_args, List<String>> { public get_role_names() { super("get_role_names"); } public get_role_names_args getEmptyArgsInstance() { return new get_role_names_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_role_names_result result = new get_role_names_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_role_names_result result = new get_role_names_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_role_names_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_role_names(resultHandler); } } public static class grant_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, grant_role_args, Boolean> { public grant_role() { super("grant_role"); } public grant_role_args getEmptyArgsInstance() { return new grant_role_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { grant_role_result result = new grant_role_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; grant_role_result result = new grant_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, grant_role_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option,resultHandler); } } public static class revoke_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revoke_role_args, Boolean> { public revoke_role() { super("revoke_role"); } public revoke_role_args getEmptyArgsInstance() { return new revoke_role_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { revoke_role_result result = new revoke_role_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; revoke_role_result result = new revoke_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.revoke_role(args.role_name, args.principal_name, args.principal_type,resultHandler); } } public static class list_roles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_roles_args, List<Role>> { public list_roles() { super("list_roles"); } public list_roles_args getEmptyArgsInstance() { return new list_roles_args(); } public AsyncMethodCallback<List<Role>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Role>>() { public void onComplete(List<Role> o) { list_roles_result result = new list_roles_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; list_roles_result result = new list_roles_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, list_roles_args args, org.apache.thrift.async.AsyncMethodCallback<List<Role>> resultHandler) throws TException { iface.list_roles(args.principal_name, args.principal_type,resultHandler); } } public static class grant_revoke_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, grant_revoke_role_args, GrantRevokeRoleResponse> { public grant_revoke_role() { super("grant_revoke_role"); } public grant_revoke_role_args getEmptyArgsInstance() { return new grant_revoke_role_args(); } public AsyncMethodCallback<GrantRevokeRoleResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GrantRevokeRoleResponse>() { public void onComplete(GrantRevokeRoleResponse o) { grant_revoke_role_result result = new grant_revoke_role_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; grant_revoke_role_result result = new grant_revoke_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, grant_revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback<GrantRevokeRoleResponse> resultHandler) throws TException { iface.grant_revoke_role(args.request,resultHandler); } } public static class get_principals_in_role<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_principals_in_role_args, GetPrincipalsInRoleResponse> { public get_principals_in_role() { super("get_principals_in_role"); } public get_principals_in_role_args getEmptyArgsInstance() { return new get_principals_in_role_args(); } public AsyncMethodCallback<GetPrincipalsInRoleResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetPrincipalsInRoleResponse>() { public void onComplete(GetPrincipalsInRoleResponse o) { get_principals_in_role_result result = new get_principals_in_role_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_principals_in_role_result result = new get_principals_in_role_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_principals_in_role_args args, org.apache.thrift.async.AsyncMethodCallback<GetPrincipalsInRoleResponse> resultHandler) throws TException { iface.get_principals_in_role(args.request,resultHandler); } } public static class get_role_grants_for_principal<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_role_grants_for_principal_args, GetRoleGrantsForPrincipalResponse> { 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(); } public AsyncMethodCallback<GetRoleGrantsForPrincipalResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetRoleGrantsForPrincipalResponse>() { public void onComplete(GetRoleGrantsForPrincipalResponse o) { get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_role_grants_for_principal_args args, org.apache.thrift.async.AsyncMethodCallback<GetRoleGrantsForPrincipalResponse> resultHandler) throws TException { iface.get_role_grants_for_principal(args.request,resultHandler); } } public static class get_privilege_set<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_privilege_set_args, PrincipalPrivilegeSet> { public get_privilege_set() { super("get_privilege_set"); } public get_privilege_set_args getEmptyArgsInstance() { return new get_privilege_set_args(); } public AsyncMethodCallback<PrincipalPrivilegeSet> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<PrincipalPrivilegeSet>() { public void onComplete(PrincipalPrivilegeSet o) { get_privilege_set_result result = new get_privilege_set_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_privilege_set_result result = new get_privilege_set_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_privilege_set_args args, org.apache.thrift.async.AsyncMethodCallback<PrincipalPrivilegeSet> resultHandler) throws TException { iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names,resultHandler); } } public static class list_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, list_privileges_args, List<HiveObjectPrivilege>> { public list_privileges() { super("list_privileges"); } public list_privileges_args getEmptyArgsInstance() { return new list_privileges_args(); } public AsyncMethodCallback<List<HiveObjectPrivilege>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<HiveObjectPrivilege>>() { public void onComplete(List<HiveObjectPrivilege> o) { list_privileges_result result = new list_privileges_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; list_privileges_result result = new list_privileges_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, list_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<List<HiveObjectPrivilege>> resultHandler) throws TException { iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject,resultHandler); } } public static class grant_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, grant_privileges_args, Boolean> { public grant_privileges() { super("grant_privileges"); } public grant_privileges_args getEmptyArgsInstance() { return new grant_privileges_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { grant_privileges_result result = new grant_privileges_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; grant_privileges_result result = new grant_privileges_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, grant_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.grant_privileges(args.privileges,resultHandler); } } public static class revoke_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revoke_privileges_args, Boolean> { public revoke_privileges() { super("revoke_privileges"); } public revoke_privileges_args getEmptyArgsInstance() { return new revoke_privileges_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { revoke_privileges_result result = new revoke_privileges_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; revoke_privileges_result result = new revoke_privileges_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.revoke_privileges(args.privileges,resultHandler); } } public static class grant_revoke_privileges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, grant_revoke_privileges_args, GrantRevokePrivilegeResponse> { public grant_revoke_privileges() { super("grant_revoke_privileges"); } public grant_revoke_privileges_args getEmptyArgsInstance() { return new grant_revoke_privileges_args(); } public AsyncMethodCallback<GrantRevokePrivilegeResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GrantRevokePrivilegeResponse>() { public void onComplete(GrantRevokePrivilegeResponse o) { grant_revoke_privileges_result result = new grant_revoke_privileges_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; grant_revoke_privileges_result result = new grant_revoke_privileges_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, grant_revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback<GrantRevokePrivilegeResponse> resultHandler) throws TException { iface.grant_revoke_privileges(args.request,resultHandler); } } public static class set_ugi<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_ugi_args, List<String>> { public set_ugi() { super("set_ugi"); } public set_ugi_args getEmptyArgsInstance() { return new set_ugi_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { set_ugi_result result = new set_ugi_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; set_ugi_result result = new set_ugi_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, set_ugi_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.set_ugi(args.user_name, args.group_names,resultHandler); } } public static class get_delegation_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_delegation_token_args, String> { public get_delegation_token() { super("get_delegation_token"); } public get_delegation_token_args getEmptyArgsInstance() { return new get_delegation_token_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { get_delegation_token_result result = new get_delegation_token_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_delegation_token_result result = new get_delegation_token_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name,resultHandler); } } public static class renew_delegation_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, renew_delegation_token_args, Long> { public renew_delegation_token() { super("renew_delegation_token"); } public renew_delegation_token_args getEmptyArgsInstance() { return new renew_delegation_token_args(); } public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Long>() { public void onComplete(Long o) { renew_delegation_token_result result = new renew_delegation_token_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; renew_delegation_token_result result = new renew_delegation_token_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, renew_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException { iface.renew_delegation_token(args.token_str_form,resultHandler); } } public static class cancel_delegation_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancel_delegation_token_args, Void> { public cancel_delegation_token() { super("cancel_delegation_token"); } public cancel_delegation_token_args getEmptyArgsInstance() { return new cancel_delegation_token_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { cancel_delegation_token_result result = new cancel_delegation_token_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; cancel_delegation_token_result result = new cancel_delegation_token_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, cancel_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.cancel_delegation_token(args.token_str_form,resultHandler); } } public static class add_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_token_args, Boolean> { public add_token() { super("add_token"); } public add_token_args getEmptyArgsInstance() { return new add_token_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { add_token_result result = new add_token_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_token_result result = new add_token_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_token_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.add_token(args.token_identifier, args.delegation_token,resultHandler); } } public static class remove_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remove_token_args, Boolean> { public remove_token() { super("remove_token"); } public remove_token_args getEmptyArgsInstance() { return new remove_token_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { remove_token_result result = new remove_token_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; remove_token_result result = new remove_token_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, remove_token_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.remove_token(args.token_identifier,resultHandler); } } public static class get_token<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_token_args, String> { public get_token() { super("get_token"); } public get_token_args getEmptyArgsInstance() { return new get_token_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { get_token_result result = new get_token_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_token_result result = new get_token_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_token_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.get_token(args.token_identifier,resultHandler); } } public static class get_all_token_identifiers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_all_token_identifiers_args, List<String>> { public get_all_token_identifiers() { super("get_all_token_identifiers"); } public get_all_token_identifiers_args getEmptyArgsInstance() { return new get_all_token_identifiers_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_all_token_identifiers_result result = new get_all_token_identifiers_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_all_token_identifiers_result result = new get_all_token_identifiers_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_all_token_identifiers_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_all_token_identifiers(resultHandler); } } public static class add_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_master_key_args, Integer> { public add_master_key() { super("add_master_key"); } public add_master_key_args getEmptyArgsInstance() { return new add_master_key_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { add_master_key_result result = new add_master_key_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_master_key_result result = new add_master_key_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.add_master_key(args.key,resultHandler); } } public static class update_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_master_key_args, Void> { public update_master_key() { super("update_master_key"); } public update_master_key_args getEmptyArgsInstance() { return new update_master_key_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { update_master_key_result result = new update_master_key_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; update_master_key_result result = new update_master_key_result(); if (e instanceof NoSuchObjectException) { result.o1 = (NoSuchObjectException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof MetaException) { result.o2 = (MetaException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, update_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.update_master_key(args.seq_number, args.key,resultHandler); } } public static class remove_master_key<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remove_master_key_args, Boolean> { public remove_master_key() { super("remove_master_key"); } public remove_master_key_args getEmptyArgsInstance() { return new remove_master_key_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { remove_master_key_result result = new remove_master_key_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; remove_master_key_result result = new remove_master_key_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, remove_master_key_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.remove_master_key(args.key_seq,resultHandler); } } public static class get_master_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_master_keys_args, List<String>> { public get_master_keys() { super("get_master_keys"); } public get_master_keys_args getEmptyArgsInstance() { return new get_master_keys_args(); } public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<String>>() { public void onComplete(List<String> o) { get_master_keys_result result = new get_master_keys_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_master_keys_result result = new get_master_keys_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_master_keys_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException { iface.get_master_keys(resultHandler); } } public static class get_open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_args, GetOpenTxnsResponse> { public get_open_txns() { super("get_open_txns"); } public get_open_txns_args getEmptyArgsInstance() { return new get_open_txns_args(); } public AsyncMethodCallback<GetOpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetOpenTxnsResponse>() { public void onComplete(GetOpenTxnsResponse o) { get_open_txns_result result = new get_open_txns_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_open_txns_result result = new get_open_txns_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsResponse> resultHandler) throws TException { iface.get_open_txns(resultHandler); } } public static class get_open_txns_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_open_txns_info_args, GetOpenTxnsInfoResponse> { public get_open_txns_info() { super("get_open_txns_info"); } public get_open_txns_info_args getEmptyArgsInstance() { return new get_open_txns_info_args(); } public AsyncMethodCallback<GetOpenTxnsInfoResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetOpenTxnsInfoResponse>() { public void onComplete(GetOpenTxnsInfoResponse o) { get_open_txns_info_result result = new get_open_txns_info_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_open_txns_info_result result = new get_open_txns_info_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_open_txns_info_args args, org.apache.thrift.async.AsyncMethodCallback<GetOpenTxnsInfoResponse> resultHandler) throws TException { iface.get_open_txns_info(resultHandler); } } public static class open_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, open_txns_args, OpenTxnsResponse> { public open_txns() { super("open_txns"); } public open_txns_args getEmptyArgsInstance() { return new open_txns_args(); } public AsyncMethodCallback<OpenTxnsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<OpenTxnsResponse>() { public void onComplete(OpenTxnsResponse o) { open_txns_result result = new open_txns_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; open_txns_result result = new open_txns_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, open_txns_args args, org.apache.thrift.async.AsyncMethodCallback<OpenTxnsResponse> resultHandler) throws TException { iface.open_txns(args.rqst,resultHandler); } } public static class abort_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abort_txn_args, Void> { public abort_txn() { super("abort_txn"); } public abort_txn_args getEmptyArgsInstance() { return new abort_txn_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { abort_txn_result result = new abort_txn_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; abort_txn_result result = new abort_txn_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, abort_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.abort_txn(args.rqst,resultHandler); } } public static class abort_txns<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abort_txns_args, Void> { public abort_txns() { super("abort_txns"); } public abort_txns_args getEmptyArgsInstance() { return new abort_txns_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { abort_txns_result result = new abort_txns_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; abort_txns_result result = new abort_txns_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, abort_txns_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.abort_txns(args.rqst,resultHandler); } } public static class commit_txn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, commit_txn_args, Void> { public commit_txn() { super("commit_txn"); } public commit_txn_args getEmptyArgsInstance() { return new commit_txn_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { commit_txn_result result = new commit_txn_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; commit_txn_result result = new commit_txn_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof TxnAbortedException) { result.o2 = (TxnAbortedException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, commit_txn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.commit_txn(args.rqst,resultHandler); } } public static class lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, lock_args, LockResponse> { public lock() { super("lock"); } public lock_args getEmptyArgsInstance() { return new lock_args(); } public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<LockResponse>() { public void onComplete(LockResponse o) { lock_result result = new lock_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; lock_result result = new lock_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof TxnAbortedException) { result.o2 = (TxnAbortedException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException { iface.lock(args.rqst,resultHandler); } } public static class check_lock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, check_lock_args, LockResponse> { public check_lock() { super("check_lock"); } public check_lock_args getEmptyArgsInstance() { return new check_lock_args(); } public AsyncMethodCallback<LockResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<LockResponse>() { public void onComplete(LockResponse o) { check_lock_result result = new check_lock_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; check_lock_result result = new check_lock_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof TxnAbortedException) { result.o2 = (TxnAbortedException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof NoSuchLockException) { result.o3 = (NoSuchLockException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, check_lock_args args, org.apache.thrift.async.AsyncMethodCallback<LockResponse> resultHandler) throws TException { iface.check_lock(args.rqst,resultHandler); } } public static class unlock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unlock_args, Void> { public unlock() { super("unlock"); } public unlock_args getEmptyArgsInstance() { return new unlock_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { unlock_result result = new unlock_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; unlock_result result = new unlock_result(); if (e instanceof NoSuchLockException) { result.o1 = (NoSuchLockException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof TxnOpenException) { result.o2 = (TxnOpenException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, unlock_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.unlock(args.rqst,resultHandler); } } public static class show_locks<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, show_locks_args, ShowLocksResponse> { public show_locks() { super("show_locks"); } public show_locks_args getEmptyArgsInstance() { return new show_locks_args(); } public AsyncMethodCallback<ShowLocksResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ShowLocksResponse>() { public void onComplete(ShowLocksResponse o) { show_locks_result result = new show_locks_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; show_locks_result result = new show_locks_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, show_locks_args args, org.apache.thrift.async.AsyncMethodCallback<ShowLocksResponse> resultHandler) throws TException { iface.show_locks(args.rqst,resultHandler); } } public static class heartbeat<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, heartbeat_args, Void> { public heartbeat() { super("heartbeat"); } public heartbeat_args getEmptyArgsInstance() { return new heartbeat_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { heartbeat_result result = new heartbeat_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; heartbeat_result result = new heartbeat_result(); if (e instanceof NoSuchLockException) { result.o1 = (NoSuchLockException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchTxnException) { result.o2 = (NoSuchTxnException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof TxnAbortedException) { result.o3 = (TxnAbortedException) e; result.setO3IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, heartbeat_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.heartbeat(args.ids,resultHandler); } } public static class heartbeat_txn_range<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, heartbeat_txn_range_args, HeartbeatTxnRangeResponse> { public heartbeat_txn_range() { super("heartbeat_txn_range"); } public heartbeat_txn_range_args getEmptyArgsInstance() { return new heartbeat_txn_range_args(); } public AsyncMethodCallback<HeartbeatTxnRangeResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<HeartbeatTxnRangeResponse>() { public void onComplete(HeartbeatTxnRangeResponse o) { heartbeat_txn_range_result result = new heartbeat_txn_range_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; heartbeat_txn_range_result result = new heartbeat_txn_range_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, heartbeat_txn_range_args args, org.apache.thrift.async.AsyncMethodCallback<HeartbeatTxnRangeResponse> resultHandler) throws TException { iface.heartbeat_txn_range(args.txns,resultHandler); } } public static class compact<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, compact_args, Void> { public compact() { super("compact"); } public compact_args getEmptyArgsInstance() { return new compact_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { compact_result result = new compact_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; compact_result result = new compact_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, compact_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.compact(args.rqst,resultHandler); } } public static class compact2<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, compact2_args, CompactionResponse> { public compact2() { super("compact2"); } public compact2_args getEmptyArgsInstance() { return new compact2_args(); } public AsyncMethodCallback<CompactionResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<CompactionResponse>() { public void onComplete(CompactionResponse o) { compact2_result result = new compact2_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; compact2_result result = new compact2_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, compact2_args args, org.apache.thrift.async.AsyncMethodCallback<CompactionResponse> resultHandler) throws TException { iface.compact2(args.rqst,resultHandler); } } public static class show_compact<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, show_compact_args, ShowCompactResponse> { public show_compact() { super("show_compact"); } public show_compact_args getEmptyArgsInstance() { return new show_compact_args(); } public AsyncMethodCallback<ShowCompactResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ShowCompactResponse>() { public void onComplete(ShowCompactResponse o) { show_compact_result result = new show_compact_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; show_compact_result result = new show_compact_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, show_compact_args args, org.apache.thrift.async.AsyncMethodCallback<ShowCompactResponse> resultHandler) throws TException { iface.show_compact(args.rqst,resultHandler); } } public static class add_dynamic_partitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_dynamic_partitions_args, Void> { public add_dynamic_partitions() { super("add_dynamic_partitions"); } public add_dynamic_partitions_args getEmptyArgsInstance() { return new add_dynamic_partitions_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { add_dynamic_partitions_result result = new add_dynamic_partitions_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; add_dynamic_partitions_result result = new add_dynamic_partitions_result(); if (e instanceof NoSuchTxnException) { result.o1 = (NoSuchTxnException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof TxnAbortedException) { result.o2 = (TxnAbortedException) e; result.setO2IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, add_dynamic_partitions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.add_dynamic_partitions(args.rqst,resultHandler); } } public static class get_next_notification<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_next_notification_args, NotificationEventResponse> { public get_next_notification() { super("get_next_notification"); } public get_next_notification_args getEmptyArgsInstance() { return new get_next_notification_args(); } public AsyncMethodCallback<NotificationEventResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<NotificationEventResponse>() { public void onComplete(NotificationEventResponse o) { get_next_notification_result result = new get_next_notification_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_next_notification_result result = new get_next_notification_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_next_notification_args args, org.apache.thrift.async.AsyncMethodCallback<NotificationEventResponse> resultHandler) throws TException { iface.get_next_notification(args.rqst,resultHandler); } } public static class get_current_notificationEventId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_current_notificationEventId_args, CurrentNotificationEventId> { public get_current_notificationEventId() { super("get_current_notificationEventId"); } public get_current_notificationEventId_args getEmptyArgsInstance() { return new get_current_notificationEventId_args(); } public AsyncMethodCallback<CurrentNotificationEventId> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<CurrentNotificationEventId>() { public void onComplete(CurrentNotificationEventId o) { get_current_notificationEventId_result result = new get_current_notificationEventId_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_current_notificationEventId_result result = new get_current_notificationEventId_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_current_notificationEventId_args args, org.apache.thrift.async.AsyncMethodCallback<CurrentNotificationEventId> resultHandler) throws TException { iface.get_current_notificationEventId(resultHandler); } } public static class fire_listener_event<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fire_listener_event_args, FireEventResponse> { public fire_listener_event() { super("fire_listener_event"); } public fire_listener_event_args getEmptyArgsInstance() { return new fire_listener_event_args(); } public AsyncMethodCallback<FireEventResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<FireEventResponse>() { public void onComplete(FireEventResponse o) { fire_listener_event_result result = new fire_listener_event_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; fire_listener_event_result result = new fire_listener_event_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, fire_listener_event_args args, org.apache.thrift.async.AsyncMethodCallback<FireEventResponse> resultHandler) throws TException { iface.fire_listener_event(args.rqst,resultHandler); } } public static class flushCache<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, flushCache_args, Void> { public flushCache() { super("flushCache"); } public flushCache_args getEmptyArgsInstance() { return new flushCache_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { flushCache_result result = new flushCache_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; flushCache_result result = new flushCache_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, flushCache_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.flushCache(resultHandler); } } public static class get_file_metadata_by_expr<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_file_metadata_by_expr_args, GetFileMetadataByExprResult> { public get_file_metadata_by_expr() { super("get_file_metadata_by_expr"); } public get_file_metadata_by_expr_args getEmptyArgsInstance() { return new get_file_metadata_by_expr_args(); } public AsyncMethodCallback<GetFileMetadataByExprResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetFileMetadataByExprResult>() { public void onComplete(GetFileMetadataByExprResult o) { get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_file_metadata_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback<GetFileMetadataByExprResult> resultHandler) throws TException { iface.get_file_metadata_by_expr(args.req,resultHandler); } } public static class get_file_metadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_file_metadata_args, GetFileMetadataResult> { public get_file_metadata() { super("get_file_metadata"); } public get_file_metadata_args getEmptyArgsInstance() { return new get_file_metadata_args(); } public AsyncMethodCallback<GetFileMetadataResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetFileMetadataResult>() { public void onComplete(GetFileMetadataResult o) { get_file_metadata_result result = new get_file_metadata_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_file_metadata_result result = new get_file_metadata_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback<GetFileMetadataResult> resultHandler) throws TException { iface.get_file_metadata(args.req,resultHandler); } } public static class put_file_metadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, put_file_metadata_args, PutFileMetadataResult> { public put_file_metadata() { super("put_file_metadata"); } public put_file_metadata_args getEmptyArgsInstance() { return new put_file_metadata_args(); } public AsyncMethodCallback<PutFileMetadataResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<PutFileMetadataResult>() { public void onComplete(PutFileMetadataResult o) { put_file_metadata_result result = new put_file_metadata_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; put_file_metadata_result result = new put_file_metadata_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, put_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback<PutFileMetadataResult> resultHandler) throws TException { iface.put_file_metadata(args.req,resultHandler); } } public static class clear_file_metadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, clear_file_metadata_args, ClearFileMetadataResult> { public clear_file_metadata() { super("clear_file_metadata"); } public clear_file_metadata_args getEmptyArgsInstance() { return new clear_file_metadata_args(); } public AsyncMethodCallback<ClearFileMetadataResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ClearFileMetadataResult>() { public void onComplete(ClearFileMetadataResult o) { clear_file_metadata_result result = new clear_file_metadata_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; clear_file_metadata_result result = new clear_file_metadata_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, clear_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback<ClearFileMetadataResult> resultHandler) throws TException { iface.clear_file_metadata(args.req,resultHandler); } } public static class cache_file_metadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cache_file_metadata_args, CacheFileMetadataResult> { public cache_file_metadata() { super("cache_file_metadata"); } public cache_file_metadata_args getEmptyArgsInstance() { return new cache_file_metadata_args(); } public AsyncMethodCallback<CacheFileMetadataResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<CacheFileMetadataResult>() { public void onComplete(CacheFileMetadataResult o) { cache_file_metadata_result result = new cache_file_metadata_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; cache_file_metadata_result result = new cache_file_metadata_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, cache_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback<CacheFileMetadataResult> resultHandler) throws TException { iface.cache_file_metadata(args.req,resultHandler); } } public static class get_metastore_db_uuid<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_metastore_db_uuid_args, String> { public get_metastore_db_uuid() { super("get_metastore_db_uuid"); } public get_metastore_db_uuid_args getEmptyArgsInstance() { return new get_metastore_db_uuid_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_metastore_db_uuid_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.get_metastore_db_uuid(resultHandler); } } } public static class getMetaConf_args implements org.apache.thrift.TBase<getMetaConf_args, getMetaConf_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMetaConf_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_key = true && (isSetKey()); list.add(present_key); if (present_key) list.add(key); return list.hashCode(); } @Override public int compareTo(getMetaConf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.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<getMetaConf_args> { 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<getMetaConf_args> { @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<getMetaConf_result, getMetaConf_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMetaConf_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(getMetaConf_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<getMetaConf_result> { 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<getMetaConf_result> { @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<setMetaConf_args, setMetaConf_args._Fields>, java.io.Serializable, Cloneable, Comparable<setMetaConf_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_key = true && (isSetKey()); list.add(present_key); if (present_key) list.add(key); boolean present_value = true && (isSetValue()); list.add(present_value); if (present_value) list.add(value); return list.hashCode(); } @Override public int compareTo(setMetaConf_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.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<setMetaConf_args> { 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<setMetaConf_args> { @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<setMetaConf_result, setMetaConf_result._Fields>, java.io.Serializable, Cloneable, Comparable<setMetaConf_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(setMetaConf_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<setMetaConf_result> { 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<setMetaConf_result> { @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<create_database_args, create_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_database_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_database = true && (isSetDatabase()); list.add(present_database); if (present_database) list.add(database); return list.hashCode(); } @Override public int compareTo(create_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(other.isSetDatabase()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.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<create_database_args> { 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<create_database_args> { @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<create_database_result, create_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_database_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(create_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<create_database_result> { 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<create_database_result> { @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<get_database_args, get_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_database_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); } public get_database_args() { } public get_database_args( String name) { this(); this.name = name; } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); return list.hashCode(); } @Override public int compareTo(get_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.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<get_database_args> { 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<get_database_args> { @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<get_database_result, get_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_database_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_database_result> { 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<get_database_result> { @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<drop_database_args, drop_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_database_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; case 2: // 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 <i>other</i>. */ 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 isDeleteData(); case CASCADE: return 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() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); boolean present_cascade = true; list.add(present_cascade); if (present_cascade) list.add(cascade); return list.hashCode(); } @Override public int compareTo(drop_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.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<drop_database_args> { 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<drop_database_args> { @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<drop_database_result, drop_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_database_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(drop_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<drop_database_result> { 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<drop_database_result> { @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<get_databases_args, get_databases_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_databases_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_pattern = true && (isSetPattern()); list.add(present_pattern); if (present_pattern) list.add(pattern); return list.hashCode(); } @Override public int compareTo(get_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.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<get_databases_args> { 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<get_databases_args> { @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<get_databases_result, get_databases_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_databases_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_databases_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_databases_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_databases_result(get_databases_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_databases_result> { 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 _list674 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list674.size); String _elem675; for (int _i676 = 0; _i676 < _list674.size; ++_i676) { _elem675 = iprot.readString(); struct.success.add(_elem675); } 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 _iter677 : struct.success) { oprot.writeString(_iter677); } 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<get_databases_result> { @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 _iter678 : struct.success) { oprot.writeString(_iter678); } } } 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 _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list679.size); String _elem680; for (int _i681 = 0; _i681 < _list679.size; ++_i681) { _elem680 = iprot.readString(); struct.success.add(_elem680); } } 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<get_all_databases_args, get_all_databases_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_databases_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); } public get_all_databases_args() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_all_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<get_all_databases_args> { 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<get_all_databases_args> { @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<get_all_databases_result, get_all_databases_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_databases_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_databases_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_databases_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_all_databases_result(get_all_databases_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_all_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_all_databases_result> { 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 _list682 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list682.size); String _elem683; for (int _i684 = 0; _i684 < _list682.size; ++_i684) { _elem683 = iprot.readString(); struct.success.add(_elem683); } 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 _iter685 : struct.success) { oprot.writeString(_iter685); } 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<get_all_databases_result> { @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 _iter686 : struct.success) { oprot.writeString(_iter686); } } } 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 _list687 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list687.size); String _elem688; for (int _i689 = 0; _i689 < _list687.size; ++_i689) { _elem688 = iprot.readString(); struct.success.add(_elem688); } } 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<alter_database_args, alter_database_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_database_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_db = true && (isSetDb()); list.add(present_db); if (present_db) list.add(db); return list.hashCode(); } @Override public int compareTo(alter_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDb()).compareTo(other.isSetDb()); if (lastComparison != 0) { return lastComparison; } if (isSetDb()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.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<alter_database_args> { 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<alter_database_args> { @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<alter_database_result, alter_database_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_database_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_database_result> { 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<alter_database_result> { @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<get_type_args, get_type_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_type_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); } public get_type_args() { } public get_type_args( String name) { this(); this.name = name; } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); return list.hashCode(); } @Override public int compareTo(get_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.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<get_type_args> { 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<get_type_args> { @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<get_type_result, get_type_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_type_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_type_result> { 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<get_type_result> { @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<create_type_args, create_type_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_type_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_type = true && (isSetType()); list.add(present_type); if (present_type) list.add(type); return list.hashCode(); } @Override public int compareTo(create_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.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<create_type_args> { 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<create_type_args> { @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<create_type_result, create_type_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_type_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(create_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<create_type_result> { 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<create_type_result> { @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<drop_type_args, drop_type_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_type_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_type = true && (isSetType()); list.add(present_type); if (present_type) list.add(type); return list.hashCode(); } @Override public int compareTo(drop_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.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<drop_type_args> { 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<drop_type_args> { @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<drop_type_result, drop_type_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_type_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(drop_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_type_result> { 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<drop_type_result> { @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<get_type_all_args, get_type_all_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_type_all_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); return list.hashCode(); } @Override public int compareTo(get_type_all_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.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<get_type_all_args> { 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<get_type_all_args> { @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<get_type_all_result, get_type_all_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_type_all_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_type_all_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_type_all_resultTupleSchemeFactory()); } private Map<String,Type> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String,Type> success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_type_all_result(get_type_all_result other) { if (other.isSetSuccess()) { Map<String,Type> __this__success = new HashMap<String,Type>(other.success.size()); for (Map.Entry<String, Type> 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<String,Type>(); } this.success.put(key, val); } public Map<String,Type> getSuccess() { return this.success; } public void setSuccess(Map<String,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 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<String,Type>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_type_all_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_type_all_result> { 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 _map690 = iprot.readMapBegin(); struct.success = new HashMap<String,Type>(2*_map690.size); String _key691; Type _val692; for (int _i693 = 0; _i693 < _map690.size; ++_i693) { _key691 = iprot.readString(); _val692 = new Type(); _val692.read(iprot); struct.success.put(_key691, _val692); } 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<String, Type> _iter694 : struct.success.entrySet()) { oprot.writeString(_iter694.getKey()); _iter694.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<get_type_all_result> { @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<String, Type> _iter695 : struct.success.entrySet()) { oprot.writeString(_iter695.getKey()); _iter695.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 _map696 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new HashMap<String,Type>(2*_map696.size); String _key697; Type _val698; for (int _i699 = 0; _i699 < _map696.size; ++_i699) { _key697 = iprot.readString(); _val698 = new Type(); _val698.read(iprot); struct.success.put(_key697, _val698); } } 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<get_fields_args, get_fields_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_fields_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_table_name = true && (isSetTable_name()); list.add(present_table_name); if (present_table_name) list.add(table_name); return list.hashCode(); } @Override public int compareTo(get_fields_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.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<get_fields_args> { 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<get_fields_args> { @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<get_fields_result, get_fields_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_fields_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_fields_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_fields_resultTupleSchemeFactory()); } private List<FieldSchema> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<FieldSchema> 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 <i>other</i>. */ public get_fields_result(get_fields_result other) { if (other.isSetSuccess()) { List<FieldSchema> __this__success = new ArrayList<FieldSchema>(other.success.size()); 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<FieldSchema> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList<FieldSchema>(); } this.success.add(elem); } public List<FieldSchema> getSuccess() { return this.success; } public void setSuccess(List<FieldSchema> 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<FieldSchema>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(get_fields_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<get_fields_result> { 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 _list700 = iprot.readListBegin(); struct.success = new ArrayList<FieldSchema>(_list700.size); FieldSchema _elem701; for (int _i702 = 0; _i702 < _list700.size; ++_i702) { _elem701 = new FieldSchema(); _elem701.read(iprot); struct.success.add(_elem701); } 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 _iter703 : struct.success) { _iter703.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<get_fields_result> { @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 _iter704 : struct.success) { _iter704.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 _list705 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<FieldSchema>(_list705.size); FieldSchema _elem706; for (int _i707 = 0; _i707 < _list705.size; ++_i707) { _elem706 = new FieldSchema(); _elem706.read(iprot); struct.success.add(_elem706); } } 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<get_fields_with_environment_context_args, get_fields_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_fields_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_table_name = true && (isSetTable_name()); list.add(present_table_name); if (present_table_name) list.add(table_name); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<get_fields_with_environment_context_args> { 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<get_fields_with_environment_context_args> { @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<get_fields_with_environment_context_result, get_fields_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_fields_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<FieldSchema> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<FieldSchema> 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 <i>other</i>. */ public get_fields_with_environment_context_result(get_fields_with_environment_context_result other) { if (other.isSetSuccess()) { List<FieldSchema> __this__success = new ArrayList<FieldSchema>(other.success.size()); 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<FieldSchema> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList<FieldSchema>(); } this.success.add(elem); } public List<FieldSchema> getSuccess() { return this.success; } public void setSuccess(List<FieldSchema> 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<FieldSchema>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<get_fields_with_environment_context_result> { 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 _list708 = iprot.readListBegin(); struct.success = new ArrayList<FieldSchema>(_list708.size); FieldSchema _elem709; for (int _i710 = 0; _i710 < _list708.size; ++_i710) { _elem709 = new FieldSchema(); _elem709.read(iprot); struct.success.add(_elem709); } 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 _iter711 : struct.success) { _iter711.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<get_fields_with_environment_context_result> { @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 _iter712 : struct.success) { _iter712.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 _list713 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<FieldSchema>(_list713.size); FieldSchema _elem714; for (int _i715 = 0; _i715 < _list713.size; ++_i715) { _elem714 = new FieldSchema(); _elem714.read(iprot); struct.success.add(_elem714); } } 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<get_schema_args, get_schema_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_schema_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_table_name = true && (isSetTable_name()); list.add(present_table_name); if (present_table_name) list.add(table_name); return list.hashCode(); } @Override public int compareTo(get_schema_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.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<get_schema_args> { 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<get_schema_args> { @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<get_schema_result, get_schema_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_schema_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_schema_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_schema_resultTupleSchemeFactory()); } private List<FieldSchema> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<FieldSchema> 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 <i>other</i>. */ public get_schema_result(get_schema_result other) { if (other.isSetSuccess()) { List<FieldSchema> __this__success = new ArrayList<FieldSchema>(other.success.size()); 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<FieldSchema> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList<FieldSchema>(); } this.success.add(elem); } public List<FieldSchema> getSuccess() { return this.success; } public void setSuccess(List<FieldSchema> 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<FieldSchema>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(get_schema_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<get_schema_result> { 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 _list716 = iprot.readListBegin(); struct.success = new ArrayList<FieldSchema>(_list716.size); FieldSchema _elem717; for (int _i718 = 0; _i718 < _list716.size; ++_i718) { _elem717 = new FieldSchema(); _elem717.read(iprot); struct.success.add(_elem717); } 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 _iter719 : struct.success) { _iter719.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<get_schema_result> { @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 _iter720 : struct.success) { _iter720.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 _list721 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<FieldSchema>(_list721.size); FieldSchema _elem722; for (int _i723 = 0; _i723 < _list721.size; ++_i723) { _elem722 = new FieldSchema(); _elem722.read(iprot); struct.success.add(_elem722); } } 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<get_schema_with_environment_context_args, get_schema_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_schema_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_table_name = true && (isSetTable_name()); list.add(present_table_name); if (present_table_name) list.add(table_name); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<get_schema_with_environment_context_args> { 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<get_schema_with_environment_context_args> { @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<get_schema_with_environment_context_result, get_schema_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_schema_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<FieldSchema> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<FieldSchema> 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 <i>other</i>. */ public get_schema_with_environment_context_result(get_schema_with_environment_context_result other) { if (other.isSetSuccess()) { List<FieldSchema> __this__success = new ArrayList<FieldSchema>(other.success.size()); 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<FieldSchema> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(FieldSchema elem) { if (this.success == null) { this.success = new ArrayList<FieldSchema>(); } this.success.add(elem); } public List<FieldSchema> getSuccess() { return this.success; } public void setSuccess(List<FieldSchema> 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<FieldSchema>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<get_schema_with_environment_context_result> { 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 _list724 = iprot.readListBegin(); struct.success = new ArrayList<FieldSchema>(_list724.size); FieldSchema _elem725; for (int _i726 = 0; _i726 < _list724.size; ++_i726) { _elem725 = new FieldSchema(); _elem725.read(iprot); struct.success.add(_elem725); } 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 _iter727 : struct.success) { _iter727.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<get_schema_with_environment_context_result> { @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 _iter728 : struct.success) { _iter728.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 _list729 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<FieldSchema>(_list729.size); FieldSchema _elem730; for (int _i731 = 0; _i731 < _list729.size; ++_i731) { _elem730 = new FieldSchema(); _elem730.read(iprot); struct.success.add(_elem730); } } 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<create_table_args, create_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_tbl = true && (isSetTbl()); list.add(present_tbl); if (present_tbl) list.add(tbl); return list.hashCode(); } @Override public int compareTo(create_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.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<create_table_args> { 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<create_table_args> { @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<create_table_result, create_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(create_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<create_table_result> { 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<create_table_result> { @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<create_table_with_environment_context_args, create_table_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_tbl = true && (isSetTbl()); list.add(present_tbl); if (present_tbl) list.add(tbl); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<create_table_with_environment_context_args> { 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<create_table_with_environment_context_args> { @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<create_table_with_environment_context_result, create_table_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<create_table_with_environment_context_result> { 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<create_table_with_environment_context_result> { @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 create_table_with_constraints_args implements org.apache.thrift.TBase<create_table_with_constraints_args, create_table_with_constraints_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_constraints_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_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 PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_with_constraints_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_with_constraints_argsTupleSchemeFactory()); } private Table tbl; // required private List<SQLPrimaryKey> primaryKeys; // required private List<SQLForeignKey> foreignKeys; // required /** 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"), PRIMARY_KEYS((short)2, "primaryKeys"), FOREIGN_KEYS((short)3, "foreignKeys"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TBL return TBL; case 2: // PRIMARY_KEYS return PRIMARY_KEYS; case 3: // FOREIGN_KEYS return FOREIGN_KEYS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 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.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", 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, SQLPrimaryKey.class)))); tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", 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, SQLForeignKey.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_args.class, metaDataMap); } public create_table_with_constraints_args() { } public create_table_with_constraints_args( Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) { this(); this.tbl = tbl; this.primaryKeys = primaryKeys; this.foreignKeys = foreignKeys; } /** * Performs a deep copy on <i>other</i>. */ public create_table_with_constraints_args(create_table_with_constraints_args other) { if (other.isSetTbl()) { this.tbl = new Table(other.tbl); } if (other.isSetPrimaryKeys()) { List<SQLPrimaryKey> __this__primaryKeys = new ArrayList<SQLPrimaryKey>(other.primaryKeys.size()); for (SQLPrimaryKey other_element : other.primaryKeys) { __this__primaryKeys.add(new SQLPrimaryKey(other_element)); } this.primaryKeys = __this__primaryKeys; } if (other.isSetForeignKeys()) { List<SQLForeignKey> __this__foreignKeys = new ArrayList<SQLForeignKey>(other.foreignKeys.size()); for (SQLForeignKey other_element : other.foreignKeys) { __this__foreignKeys.add(new SQLForeignKey(other_element)); } this.foreignKeys = __this__foreignKeys; } } public create_table_with_constraints_args deepCopy() { return new create_table_with_constraints_args(this); } @Override public void clear() { this.tbl = null; this.primaryKeys = null; this.foreignKeys = 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 int getPrimaryKeysSize() { return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); } public java.util.Iterator<SQLPrimaryKey> getPrimaryKeysIterator() { return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); } public void addToPrimaryKeys(SQLPrimaryKey elem) { if (this.primaryKeys == null) { this.primaryKeys = new ArrayList<SQLPrimaryKey>(); } this.primaryKeys.add(elem); } public List<SQLPrimaryKey> getPrimaryKeys() { return this.primaryKeys; } public void setPrimaryKeys(List<SQLPrimaryKey> primaryKeys) { this.primaryKeys = primaryKeys; } public void unsetPrimaryKeys() { this.primaryKeys = null; } /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ public boolean isSetPrimaryKeys() { return this.primaryKeys != null; } public void setPrimaryKeysIsSet(boolean value) { if (!value) { this.primaryKeys = null; } } public int getForeignKeysSize() { return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); } public java.util.Iterator<SQLForeignKey> getForeignKeysIterator() { return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); } public void addToForeignKeys(SQLForeignKey elem) { if (this.foreignKeys == null) { this.foreignKeys = new ArrayList<SQLForeignKey>(); } this.foreignKeys.add(elem); } public List<SQLForeignKey> getForeignKeys() { return this.foreignKeys; } public void setForeignKeys(List<SQLForeignKey> foreignKeys) { this.foreignKeys = foreignKeys; } public void unsetForeignKeys() { this.foreignKeys = null; } /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ public boolean isSetForeignKeys() { return this.foreignKeys != null; } public void setForeignKeysIsSet(boolean value) { if (!value) { this.foreignKeys = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TBL: if (value == null) { unsetTbl(); } else { setTbl((Table)value); } break; case PRIMARY_KEYS: if (value == null) { unsetPrimaryKeys(); } else { setPrimaryKeys((List<SQLPrimaryKey>)value); } break; case FOREIGN_KEYS: if (value == null) { unsetForeignKeys(); } else { setForeignKeys((List<SQLForeignKey>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TBL: return getTbl(); case PRIMARY_KEYS: return getPrimaryKeys(); case FOREIGN_KEYS: return getForeignKeys(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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 PRIMARY_KEYS: return isSetPrimaryKeys(); case FOREIGN_KEYS: return isSetForeignKeys(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_table_with_constraints_args) return this.equals((create_table_with_constraints_args)that); return false; } public boolean equals(create_table_with_constraints_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_primaryKeys = true && this.isSetPrimaryKeys(); boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); if (this_present_primaryKeys || that_present_primaryKeys) { if (!(this_present_primaryKeys && that_present_primaryKeys)) return false; if (!this.primaryKeys.equals(that.primaryKeys)) return false; } boolean this_present_foreignKeys = true && this.isSetForeignKeys(); boolean that_present_foreignKeys = true && that.isSetForeignKeys(); if (this_present_foreignKeys || that_present_foreignKeys) { if (!(this_present_foreignKeys && that_present_foreignKeys)) return false; if (!this.foreignKeys.equals(that.foreignKeys)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_tbl = true && (isSetTbl()); list.add(present_tbl); if (present_tbl) list.add(tbl); boolean present_primaryKeys = true && (isSetPrimaryKeys()); list.add(present_primaryKeys); if (present_primaryKeys) list.add(primaryKeys); boolean present_foreignKeys = true && (isSetForeignKeys()); list.add(present_foreignKeys); if (present_foreignKeys) list.add(foreignKeys); return list.hashCode(); } @Override public int compareTo(create_table_with_constraints_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); if (lastComparison != 0) { return lastComparison; } if (isSetPrimaryKeys()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); if (lastComparison != 0) { return lastComparison; } if (isSetForeignKeys()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_constraints_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("primaryKeys:"); if (this.primaryKeys == null) { sb.append("null"); } else { sb.append(this.primaryKeys); } first = false; if (!first) sb.append(", "); sb.append("foreignKeys:"); if (this.foreignKeys == null) { sb.append("null"); } else { sb.append(this.foreignKeys); } 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_with_constraints_argsStandardSchemeFactory implements SchemeFactory { public create_table_with_constraints_argsStandardScheme getScheme() { return new create_table_with_constraints_argsStandardScheme(); } } private static class create_table_with_constraints_argsStandardScheme extends StandardScheme<create_table_with_constraints_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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: // PRIMARY_KEYS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list732 = iprot.readListBegin(); struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list732.size); SQLPrimaryKey _elem733; for (int _i734 = 0; _i734 < _list732.size; ++_i734) { _elem733 = new SQLPrimaryKey(); _elem733.read(iprot); struct.primaryKeys.add(_elem733); } iprot.readListEnd(); } struct.setPrimaryKeysIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FOREIGN_KEYS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list735 = iprot.readListBegin(); struct.foreignKeys = new ArrayList<SQLForeignKey>(_list735.size); SQLForeignKey _elem736; for (int _i737 = 0; _i737 < _list735.size; ++_i737) { _elem736 = new SQLForeignKey(); _elem736.read(iprot); struct.foreignKeys.add(_elem736); } iprot.readListEnd(); } struct.setForeignKeysIsSet(true); } else { 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_constraints_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.primaryKeys != null) { oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); for (SQLPrimaryKey _iter738 : struct.primaryKeys) { _iter738.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.foreignKeys != null) { oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); for (SQLForeignKey _iter739 : struct.foreignKeys) { _iter739.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class create_table_with_constraints_argsTupleSchemeFactory implements SchemeFactory { public create_table_with_constraints_argsTupleScheme getScheme() { return new create_table_with_constraints_argsTupleScheme(); } } private static class create_table_with_constraints_argsTupleScheme extends TupleScheme<create_table_with_constraints_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTbl()) { optionals.set(0); } if (struct.isSetPrimaryKeys()) { optionals.set(1); } if (struct.isSetForeignKeys()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTbl()) { struct.tbl.write(oprot); } if (struct.isSetPrimaryKeys()) { { oprot.writeI32(struct.primaryKeys.size()); for (SQLPrimaryKey _iter740 : struct.primaryKeys) { _iter740.write(oprot); } } } if (struct.isSetForeignKeys()) { { oprot.writeI32(struct.foreignKeys.size()); for (SQLForeignKey _iter741 : struct.foreignKeys) { _iter741.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.tbl = new Table(); struct.tbl.read(iprot); struct.setTblIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list742 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list742.size); SQLPrimaryKey _elem743; for (int _i744 = 0; _i744 < _list742.size; ++_i744) { _elem743 = new SQLPrimaryKey(); _elem743.read(iprot); struct.primaryKeys.add(_elem743); } } struct.setPrimaryKeysIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list745 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.foreignKeys = new ArrayList<SQLForeignKey>(_list745.size); SQLForeignKey _elem746; for (int _i747 = 0; _i747 < _list745.size; ++_i747) { _elem746 = new SQLForeignKey(); _elem746.read(iprot); struct.foreignKeys.add(_elem746); } } struct.setForeignKeysIsSet(true); } } } } public static class create_table_with_constraints_result implements org.apache.thrift.TBase<create_table_with_constraints_result, create_table_with_constraints_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_constraints_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new create_table_with_constraints_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new create_table_with_constraints_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_constraints_result.class, metaDataMap); } public create_table_with_constraints_result() { } public create_table_with_constraints_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 <i>other</i>. */ public create_table_with_constraints_result(create_table_with_constraints_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_constraints_result deepCopy() { return new create_table_with_constraints_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_constraints_result) return this.equals((create_table_with_constraints_result)that); return false; } public boolean equals(create_table_with_constraints_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(create_table_with_constraints_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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_constraints_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_constraints_resultStandardSchemeFactory implements SchemeFactory { public create_table_with_constraints_resultStandardScheme getScheme() { return new create_table_with_constraints_resultStandardScheme(); } } private static class create_table_with_constraints_resultStandardScheme extends StandardScheme<create_table_with_constraints_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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_constraints_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_constraints_resultTupleSchemeFactory implements SchemeFactory { public create_table_with_constraints_resultTupleScheme getScheme() { return new create_table_with_constraints_resultTupleScheme(); } } private static class create_table_with_constraints_resultTupleScheme extends TupleScheme<create_table_with_constraints_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_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_constraints_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_constraint_args implements org.apache.thrift.TBase<drop_constraint_args, drop_constraint_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_constraint_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_constraint_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_constraint_argsTupleSchemeFactory()); } private DropConstraintRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, DropConstraintRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_constraint_args.class, metaDataMap); } public drop_constraint_args() { } public drop_constraint_args( DropConstraintRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public drop_constraint_args(drop_constraint_args other) { if (other.isSetReq()) { this.req = new DropConstraintRequest(other.req); } } public drop_constraint_args deepCopy() { return new drop_constraint_args(this); } @Override public void clear() { this.req = null; } public DropConstraintRequest getReq() { return this.req; } public void setReq(DropConstraintRequest 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((DropConstraintRequest)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_constraint_args) return this.equals((drop_constraint_args)that); return false; } public boolean equals(drop_constraint_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(drop_constraint_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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_constraint_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_constraint_argsStandardSchemeFactory implements SchemeFactory { public drop_constraint_argsStandardScheme getScheme() { return new drop_constraint_argsStandardScheme(); } } private static class drop_constraint_argsStandardScheme extends StandardScheme<drop_constraint_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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 DropConstraintRequest(); 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_constraint_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_constraint_argsTupleSchemeFactory implements SchemeFactory { public drop_constraint_argsTupleScheme getScheme() { return new drop_constraint_argsTupleScheme(); } } private static class drop_constraint_argsTupleScheme extends TupleScheme<drop_constraint_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_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_constraint_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new DropConstraintRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class drop_constraint_result implements org.apache.thrift.TBase<drop_constraint_result, drop_constraint_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_constraint_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new drop_constraint_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new drop_constraint_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_constraint_result.class, metaDataMap); } public drop_constraint_result() { } public drop_constraint_result( NoSuchObjectException o1, MetaException o3) { this(); this.o1 = o1; this.o3 = o3; } /** * Performs a deep copy on <i>other</i>. */ public drop_constraint_result(drop_constraint_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } public drop_constraint_result deepCopy() { return new drop_constraint_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_constraint_result) return this.equals((drop_constraint_result)that); return false; } public boolean equals(drop_constraint_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(drop_constraint_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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_constraint_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_constraint_resultStandardSchemeFactory implements SchemeFactory { public drop_constraint_resultStandardScheme getScheme() { return new drop_constraint_resultStandardScheme(); } } private static class drop_constraint_resultStandardScheme extends StandardScheme<drop_constraint_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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_constraint_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_constraint_resultTupleSchemeFactory implements SchemeFactory { public drop_constraint_resultTupleScheme getScheme() { return new drop_constraint_resultTupleScheme(); } } private static class drop_constraint_resultTupleScheme extends TupleScheme<drop_constraint_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_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_constraint_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 add_primary_key_args implements org.apache.thrift.TBase<add_primary_key_args, add_primary_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_primary_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_primary_key_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_primary_key_argsTupleSchemeFactory()); } private AddPrimaryKeyRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, AddPrimaryKeyRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_primary_key_args.class, metaDataMap); } public add_primary_key_args() { } public add_primary_key_args( AddPrimaryKeyRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public add_primary_key_args(add_primary_key_args other) { if (other.isSetReq()) { this.req = new AddPrimaryKeyRequest(other.req); } } public add_primary_key_args deepCopy() { return new add_primary_key_args(this); } @Override public void clear() { this.req = null; } public AddPrimaryKeyRequest getReq() { return this.req; } public void setReq(AddPrimaryKeyRequest 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((AddPrimaryKeyRequest)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 add_primary_key_args) return this.equals((add_primary_key_args)that); return false; } public boolean equals(add_primary_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(add_primary_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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("add_primary_key_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 add_primary_key_argsStandardSchemeFactory implements SchemeFactory { public add_primary_key_argsStandardScheme getScheme() { return new add_primary_key_argsStandardScheme(); } } private static class add_primary_key_argsStandardScheme extends StandardScheme<add_primary_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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 AddPrimaryKeyRequest(); 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, add_primary_key_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 add_primary_key_argsTupleSchemeFactory implements SchemeFactory { public add_primary_key_argsTupleScheme getScheme() { return new add_primary_key_argsTupleScheme(); } } private static class add_primary_key_argsTupleScheme extends TupleScheme<add_primary_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_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, add_primary_key_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new AddPrimaryKeyRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class add_primary_key_result implements org.apache.thrift.TBase<add_primary_key_result, add_primary_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_primary_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_primary_key_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_primary_key_resultTupleSchemeFactory()); } 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_primary_key_result.class, metaDataMap); } public add_primary_key_result() { } public add_primary_key_result( NoSuchObjectException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public add_primary_key_result(add_primary_key_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public add_primary_key_result deepCopy() { return new add_primary_key_result(this); } @Override public void clear() { this.o1 = null; this.o2 = 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 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 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_primary_key_result) return this.equals((add_primary_key_result)that); return false; } public boolean equals(add_primary_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(add_primary_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_primary_key_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_primary_key_resultStandardSchemeFactory implements SchemeFactory { public add_primary_key_resultStandardScheme getScheme() { return new add_primary_key_resultStandardScheme(); } } private static class add_primary_key_resultStandardScheme extends StandardScheme<add_primary_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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 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, add_primary_key_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_primary_key_resultTupleSchemeFactory implements SchemeFactory { public add_primary_key_resultTupleScheme getScheme() { return new add_primary_key_resultTupleScheme(); } } private static class add_primary_key_resultTupleScheme extends TupleScheme<add_primary_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_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_primary_key_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.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class add_foreign_key_args implements org.apache.thrift.TBase<add_foreign_key_args, add_foreign_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_foreign_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_foreign_key_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_foreign_key_argsTupleSchemeFactory()); } private AddForeignKeyRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, AddForeignKeyRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_foreign_key_args.class, metaDataMap); } public add_foreign_key_args() { } public add_foreign_key_args( AddForeignKeyRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public add_foreign_key_args(add_foreign_key_args other) { if (other.isSetReq()) { this.req = new AddForeignKeyRequest(other.req); } } public add_foreign_key_args deepCopy() { return new add_foreign_key_args(this); } @Override public void clear() { this.req = null; } public AddForeignKeyRequest getReq() { return this.req; } public void setReq(AddForeignKeyRequest 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((AddForeignKeyRequest)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 add_foreign_key_args) return this.equals((add_foreign_key_args)that); return false; } public boolean equals(add_foreign_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(add_foreign_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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("add_foreign_key_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 add_foreign_key_argsStandardSchemeFactory implements SchemeFactory { public add_foreign_key_argsStandardScheme getScheme() { return new add_foreign_key_argsStandardScheme(); } } private static class add_foreign_key_argsStandardScheme extends StandardScheme<add_foreign_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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 AddForeignKeyRequest(); 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, add_foreign_key_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 add_foreign_key_argsTupleSchemeFactory implements SchemeFactory { public add_foreign_key_argsTupleScheme getScheme() { return new add_foreign_key_argsTupleScheme(); } } private static class add_foreign_key_argsTupleScheme extends TupleScheme<add_foreign_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_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, add_foreign_key_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new AddForeignKeyRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class add_foreign_key_result implements org.apache.thrift.TBase<add_foreign_key_result, add_foreign_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_foreign_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_foreign_key_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_foreign_key_resultTupleSchemeFactory()); } 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_foreign_key_result.class, metaDataMap); } public add_foreign_key_result() { } public add_foreign_key_result( NoSuchObjectException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public add_foreign_key_result(add_foreign_key_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public add_foreign_key_result deepCopy() { return new add_foreign_key_result(this); } @Override public void clear() { this.o1 = null; this.o2 = 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 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 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_foreign_key_result) return this.equals((add_foreign_key_result)that); return false; } public boolean equals(add_foreign_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(add_foreign_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_foreign_key_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_foreign_key_resultStandardSchemeFactory implements SchemeFactory { public add_foreign_key_resultStandardScheme getScheme() { return new add_foreign_key_resultStandardScheme(); } } private static class add_foreign_key_resultStandardScheme extends StandardScheme<add_foreign_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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 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, add_foreign_key_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_foreign_key_resultTupleSchemeFactory implements SchemeFactory { public add_foreign_key_resultTupleScheme getScheme() { return new add_foreign_key_resultTupleScheme(); } } private static class add_foreign_key_resultTupleScheme extends TupleScheme<add_foreign_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_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_foreign_key_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.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class drop_table_args implements org.apache.thrift.TBase<drop_table_args, drop_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); return list.hashCode(); } @Override public int compareTo(drop_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.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<drop_table_args> { 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<drop_table_args> { @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<drop_table_result, drop_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(drop_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<drop_table_result> { 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<drop_table_result> { @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<drop_table_with_environment_context_args, drop_table_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<drop_table_with_environment_context_args> { 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<drop_table_with_environment_context_args> { @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<drop_table_with_environment_context_result, drop_table_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<drop_table_with_environment_context_result> { 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<drop_table_with_environment_context_result> { @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 truncate_table_args implements org.apache.thrift.TBase<truncate_table_args, truncate_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<truncate_table_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_table_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new truncate_table_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new truncate_table_argsTupleSchemeFactory()); } private String dbName; // required private String tableName; // required private List<String> partNames; // required /** 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"), TABLE_NAME((short)2, "tableName"), PART_NAMES((short)3, "partNames"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DB_NAME return DB_NAME; case 2: // TABLE_NAME return TABLE_NAME; case 3: // PART_NAMES return PART_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("dbName", 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("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", 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(truncate_table_args.class, metaDataMap); } public truncate_table_args() { } public truncate_table_args( String dbName, String tableName, List<String> partNames) { this(); this.dbName = dbName; this.tableName = tableName; this.partNames = partNames; } /** * Performs a deep copy on <i>other</i>. */ public truncate_table_args(truncate_table_args other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetTableName()) { this.tableName = other.tableName; } if (other.isSetPartNames()) { List<String> __this__partNames = new ArrayList<String>(other.partNames); this.partNames = __this__partNames; } } public truncate_table_args deepCopy() { return new truncate_table_args(this); } @Override public void clear() { this.dbName = null; this.tableName = null; this.partNames = 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 getTableName() { return this.tableName; } public void setTableName(String tableName) { this.tableName = tableName; } public void unsetTableName() { this.tableName = null; } /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ public boolean isSetTableName() { return this.tableName != null; } public void setTableNameIsSet(boolean value) { if (!value) { this.tableName = null; } } public int getPartNamesSize() { return (this.partNames == null) ? 0 : this.partNames.size(); } public java.util.Iterator<String> getPartNamesIterator() { return (this.partNames == null) ? null : this.partNames.iterator(); } public void addToPartNames(String elem) { if (this.partNames == null) { this.partNames = new ArrayList<String>(); } this.partNames.add(elem); } public List<String> getPartNames() { return this.partNames; } public void setPartNames(List<String> partNames) { this.partNames = partNames; } public void unsetPartNames() { this.partNames = null; } /** Returns true if field partNames is set (has been assigned a value) and false otherwise */ public boolean isSetPartNames() { return this.partNames != null; } public void setPartNamesIsSet(boolean value) { if (!value) { this.partNames = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDbName(); } else { setDbName((String)value); } break; case TABLE_NAME: if (value == null) { unsetTableName(); } else { setTableName((String)value); } break; case PART_NAMES: if (value == null) { unsetPartNames(); } else { setPartNames((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDbName(); case TABLE_NAME: return getTableName(); case PART_NAMES: return getPartNames(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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 TABLE_NAME: return isSetTableName(); case PART_NAMES: return isSetPartNames(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof truncate_table_args) return this.equals((truncate_table_args)that); return false; } public boolean equals(truncate_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_tableName = true && this.isSetTableName(); boolean that_present_tableName = true && that.isSetTableName(); if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; if (!this.tableName.equals(that.tableName)) return false; } boolean this_present_partNames = true && this.isSetPartNames(); boolean that_present_partNames = true && that.isSetPartNames(); if (this_present_partNames || that_present_partNames) { if (!(this_present_partNames && that_present_partNames)) return false; if (!this.partNames.equals(that.partNames)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_tableName = true && (isSetTableName()); list.add(present_tableName); if (present_tableName) list.add(tableName); boolean present_partNames = true && (isSetPartNames()); list.add(present_partNames); if (present_partNames) list.add(partNames); return list.hashCode(); } @Override public int compareTo(truncate_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames()); if (lastComparison != 0) { return lastComparison; } if (isSetPartNames()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("truncate_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("tableName:"); if (this.tableName == null) { sb.append("null"); } else { sb.append(this.tableName); } first = false; if (!first) sb.append(", "); sb.append("partNames:"); if (this.partNames == null) { sb.append("null"); } else { sb.append(this.partNames); } 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 truncate_table_argsStandardSchemeFactory implements SchemeFactory { public truncate_table_argsStandardScheme getScheme() { return new truncate_table_argsStandardScheme(); } } private static class truncate_table_argsStandardScheme extends StandardScheme<truncate_table_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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: // 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: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tableName = iprot.readString(); struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PART_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list748 = iprot.readListBegin(); struct.partNames = new ArrayList<String>(_list748.size); String _elem749; for (int _i750 = 0; _i750 < _list748.size; ++_i750) { _elem749 = iprot.readString(); struct.partNames.add(_elem749); } iprot.readListEnd(); } struct.setPartNamesIsSet(true); } else { 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, truncate_table_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.tableName != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.tableName); oprot.writeFieldEnd(); } if (struct.partNames != null) { oprot.writeFieldBegin(PART_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size())); for (String _iter751 : struct.partNames) { oprot.writeString(_iter751); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class truncate_table_argsTupleSchemeFactory implements SchemeFactory { public truncate_table_argsTupleScheme getScheme() { return new truncate_table_argsTupleScheme(); } } private static class truncate_table_argsTupleScheme extends TupleScheme<truncate_table_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDbName()) { optionals.set(0); } if (struct.isSetTableName()) { optionals.set(1); } if (struct.isSetPartNames()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDbName()) { oprot.writeString(struct.dbName); } if (struct.isSetTableName()) { oprot.writeString(struct.tableName); } if (struct.isSetPartNames()) { { oprot.writeI32(struct.partNames.size()); for (String _iter752 : struct.partNames) { oprot.writeString(_iter752); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, truncate_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.tableName = iprot.readString(); struct.setTableNameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list753 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.partNames = new ArrayList<String>(_list753.size); String _elem754; for (int _i755 = 0; _i755 < _list753.size; ++_i755) { _elem754 = iprot.readString(); struct.partNames.add(_elem754); } } struct.setPartNamesIsSet(true); } } } } public static class truncate_table_result implements org.apache.thrift.TBase<truncate_table_result, truncate_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<truncate_table_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new truncate_table_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new truncate_table_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(truncate_table_result.class, metaDataMap); } public truncate_table_result() { } public truncate_table_result( MetaException o1) { this(); this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public truncate_table_result(truncate_table_result other) { if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public truncate_table_result deepCopy() { return new truncate_table_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 truncate_table_result) return this.equals((truncate_table_result)that); return false; } public boolean equals(truncate_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(truncate_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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("truncate_table_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 truncate_table_resultStandardSchemeFactory implements SchemeFactory { public truncate_table_resultStandardScheme getScheme() { return new truncate_table_resultStandardScheme(); } } private static class truncate_table_resultStandardScheme extends StandardScheme<truncate_table_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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 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, truncate_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(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class truncate_table_resultTupleSchemeFactory implements SchemeFactory { public truncate_table_resultTupleScheme getScheme() { return new truncate_table_resultTupleScheme(); } } private static class truncate_table_resultTupleScheme extends TupleScheme<truncate_table_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_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, truncate_table_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_tables_args implements org.apache.thrift.TBase<get_tables_args, get_tables_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_pattern = true && (isSetPattern()); list.add(present_pattern); if (present_pattern) list.add(pattern); return list.hashCode(); } @Override public int compareTo(get_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.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<get_tables_args> { 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<get_tables_args> { @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<get_tables_result, get_tables_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_tables_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_tables_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_result(get_tables_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_tables_result> { 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 _list756 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list756.size); String _elem757; for (int _i758 = 0; _i758 < _list756.size; ++_i758) { _elem757 = iprot.readString(); struct.success.add(_elem757); } 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 _iter759 : struct.success) { oprot.writeString(_iter759); } 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<get_tables_result> { @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 _iter760 : struct.success) { oprot.writeString(_iter760); } } } 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 _list761 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list761.size); String _elem762; for (int _i763 = 0; _i763 < _list761.size; ++_i763) { _elem762 = iprot.readString(); struct.success.add(_elem762); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_tables_by_type_args implements org.apache.thrift.TBase<get_tables_by_type_args, get_tables_by_type_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_by_type_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_type_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 org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_tables_by_type_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_tables_by_type_argsTupleSchemeFactory()); } private String db_name; // required private String pattern; // required private String tableType; // required /** 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"), TABLE_TYPE((short)3, "tableType"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DB_NAME return DB_NAME; case 2: // PATTERN return PATTERN; case 3: // TABLE_TYPE return TABLE_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.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))); tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", 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_by_type_args.class, metaDataMap); } public get_tables_by_type_args() { } public get_tables_by_type_args( String db_name, String pattern, String tableType) { this(); this.db_name = db_name; this.pattern = pattern; this.tableType = tableType; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_by_type_args(get_tables_by_type_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetPattern()) { this.pattern = other.pattern; } if (other.isSetTableType()) { this.tableType = other.tableType; } } public get_tables_by_type_args deepCopy() { return new get_tables_by_type_args(this); } @Override public void clear() { this.db_name = null; this.pattern = null; this.tableType = 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 String getTableType() { return this.tableType; } public void setTableType(String tableType) { this.tableType = tableType; } public void unsetTableType() { this.tableType = null; } /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ public boolean isSetTableType() { return this.tableType != null; } public void setTableTypeIsSet(boolean value) { if (!value) { this.tableType = 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; case TABLE_TYPE: if (value == null) { unsetTableType(); } else { setTableType((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case PATTERN: return getPattern(); case TABLE_TYPE: return getTableType(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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(); case TABLE_TYPE: return isSetTableType(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_tables_by_type_args) return this.equals((get_tables_by_type_args)that); return false; } public boolean equals(get_tables_by_type_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; } boolean this_present_tableType = true && this.isSetTableType(); boolean that_present_tableType = true && that.isSetTableType(); if (this_present_tableType || that_present_tableType) { if (!(this_present_tableType && that_present_tableType)) return false; if (!this.tableType.equals(that.tableType)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_pattern = true && (isSetPattern()); list.add(present_pattern); if (present_pattern) list.add(pattern); boolean present_tableType = true && (isSetTableType()); list.add(present_tableType); if (present_tableType) list.add(tableType); return list.hashCode(); } @Override public int compareTo(get_tables_by_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); if (lastComparison != 0) { return lastComparison; } if (isSetTableType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_by_type_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; if (!first) sb.append(", "); sb.append("tableType:"); if (this.tableType == null) { sb.append("null"); } else { sb.append(this.tableType); } 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_by_type_argsStandardSchemeFactory implements SchemeFactory { public get_tables_by_type_argsStandardScheme getScheme() { return new get_tables_by_type_argsStandardScheme(); } } private static class get_tables_by_type_argsStandardScheme extends StandardScheme<get_tables_by_type_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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: // 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; case 3: // TABLE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tableType = iprot.readString(); struct.setTableTypeIsSet(true); } else { 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_by_type_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(); } if (struct.tableType != null) { oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); oprot.writeString(struct.tableType); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_tables_by_type_argsTupleSchemeFactory implements SchemeFactory { public get_tables_by_type_argsTupleScheme getScheme() { return new get_tables_by_type_argsTupleScheme(); } } private static class get_tables_by_type_argsTupleScheme extends TupleScheme<get_tables_by_type_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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); } if (struct.isSetTableType()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_name()) { oprot.writeString(struct.db_name); } if (struct.isSetPattern()) { oprot.writeString(struct.pattern); } if (struct.isSetTableType()) { oprot.writeString(struct.tableType); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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.pattern = iprot.readString(); struct.setPatternIsSet(true); } if (incoming.get(2)) { struct.tableType = iprot.readString(); struct.setTableTypeIsSet(true); } } } } public static class get_tables_by_type_result implements org.apache.thrift.TBase<get_tables_by_type_result, get_tables_by_type_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_tables_by_type_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_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.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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_tables_by_type_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_tables_by_type_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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_by_type_result.class, metaDataMap); } public get_tables_by_type_result() { } public get_tables_by_type_result( List<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_tables_by_type_result(get_tables_by_type_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_tables_by_type_result deepCopy() { return new get_tables_by_type_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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_tables_by_type_result) return this.equals((get_tables_by_type_result)that); return false; } public boolean equals(get_tables_by_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_tables_by_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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_by_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; 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_by_type_resultStandardSchemeFactory implements SchemeFactory { public get_tables_by_type_resultStandardScheme getScheme() { return new get_tables_by_type_resultStandardScheme(); } } private static class get_tables_by_type_resultStandardScheme extends StandardScheme<get_tables_by_type_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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.LIST) { { org.apache.thrift.protocol.TList _list764 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list764.size); String _elem765; for (int _i766 = 0; _i766 < _list764.size; ++_i766) { _elem765 = iprot.readString(); struct.success.add(_elem765); } 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_by_type_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 _iter767 : struct.success) { oprot.writeString(_iter767); } 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_by_type_resultTupleSchemeFactory implements SchemeFactory { public get_tables_by_type_resultTupleScheme getScheme() { return new get_tables_by_type_resultTupleScheme(); } } private static class get_tables_by_type_resultTupleScheme extends TupleScheme<get_tables_by_type_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_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); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter768 : struct.success) { oprot.writeString(_iter768); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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 _list769 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list769.size); String _elem770; for (int _i771 = 0; _i771 < _list769.size; ++_i771) { _elem770 = iprot.readString(); struct.success.add(_elem770); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class get_table_meta_args implements org.apache.thrift.TBase<get_table_meta_args, get_table_meta_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_meta_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_args"); private static final org.apache.thrift.protocol.TField DB_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("db_patterns", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_patterns", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField TBL_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_types", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_meta_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_meta_argsTupleSchemeFactory()); } private String db_patterns; // required private String tbl_patterns; // required private List<String> tbl_types; // required /** 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_PATTERNS((short)1, "db_patterns"), TBL_PATTERNS((short)2, "tbl_patterns"), TBL_TYPES((short)3, "tbl_types"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DB_PATTERNS return DB_PATTERNS; case 2: // TBL_PATTERNS return TBL_PATTERNS; case 3: // TBL_TYPES return TBL_TYPES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 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_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("db_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("tbl_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_TYPES, new org.apache.thrift.meta_data.FieldMetaData("tbl_types", 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_meta_args.class, metaDataMap); } public get_table_meta_args() { } public get_table_meta_args( String db_patterns, String tbl_patterns, List<String> tbl_types) { this(); this.db_patterns = db_patterns; this.tbl_patterns = tbl_patterns; this.tbl_types = tbl_types; } /** * Performs a deep copy on <i>other</i>. */ public get_table_meta_args(get_table_meta_args other) { if (other.isSetDb_patterns()) { this.db_patterns = other.db_patterns; } if (other.isSetTbl_patterns()) { this.tbl_patterns = other.tbl_patterns; } if (other.isSetTbl_types()) { List<String> __this__tbl_types = new ArrayList<String>(other.tbl_types); this.tbl_types = __this__tbl_types; } } public get_table_meta_args deepCopy() { return new get_table_meta_args(this); } @Override public void clear() { this.db_patterns = null; this.tbl_patterns = null; this.tbl_types = null; } public String getDb_patterns() { return this.db_patterns; } public void setDb_patterns(String db_patterns) { this.db_patterns = db_patterns; } public void unsetDb_patterns() { this.db_patterns = null; } /** Returns true if field db_patterns is set (has been assigned a value) and false otherwise */ public boolean isSetDb_patterns() { return this.db_patterns != null; } public void setDb_patternsIsSet(boolean value) { if (!value) { this.db_patterns = null; } } public String getTbl_patterns() { return this.tbl_patterns; } public void setTbl_patterns(String tbl_patterns) { this.tbl_patterns = tbl_patterns; } public void unsetTbl_patterns() { this.tbl_patterns = null; } /** Returns true if field tbl_patterns is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_patterns() { return this.tbl_patterns != null; } public void setTbl_patternsIsSet(boolean value) { if (!value) { this.tbl_patterns = null; } } public int getTbl_typesSize() { return (this.tbl_types == null) ? 0 : this.tbl_types.size(); } public java.util.Iterator<String> getTbl_typesIterator() { return (this.tbl_types == null) ? null : this.tbl_types.iterator(); } public void addToTbl_types(String elem) { if (this.tbl_types == null) { this.tbl_types = new ArrayList<String>(); } this.tbl_types.add(elem); } public List<String> getTbl_types() { return this.tbl_types; } public void setTbl_types(List<String> tbl_types) { this.tbl_types = tbl_types; } public void unsetTbl_types() { this.tbl_types = null; } /** Returns true if field tbl_types is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_types() { return this.tbl_types != null; } public void setTbl_typesIsSet(boolean value) { if (!value) { this.tbl_types = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_PATTERNS: if (value == null) { unsetDb_patterns(); } else { setDb_patterns((String)value); } break; case TBL_PATTERNS: if (value == null) { unsetTbl_patterns(); } else { setTbl_patterns((String)value); } break; case TBL_TYPES: if (value == null) { unsetTbl_types(); } else { setTbl_types((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_PATTERNS: return getDb_patterns(); case TBL_PATTERNS: return getTbl_patterns(); case TBL_TYPES: return getTbl_types(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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_PATTERNS: return isSetDb_patterns(); case TBL_PATTERNS: return isSetTbl_patterns(); case TBL_TYPES: return isSetTbl_types(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_meta_args) return this.equals((get_table_meta_args)that); return false; } public boolean equals(get_table_meta_args that) { if (that == null) return false; boolean this_present_db_patterns = true && this.isSetDb_patterns(); boolean that_present_db_patterns = true && that.isSetDb_patterns(); if (this_present_db_patterns || that_present_db_patterns) { if (!(this_present_db_patterns && that_present_db_patterns)) return false; if (!this.db_patterns.equals(that.db_patterns)) return false; } boolean this_present_tbl_patterns = true && this.isSetTbl_patterns(); boolean that_present_tbl_patterns = true && that.isSetTbl_patterns(); if (this_present_tbl_patterns || that_present_tbl_patterns) { if (!(this_present_tbl_patterns && that_present_tbl_patterns)) return false; if (!this.tbl_patterns.equals(that.tbl_patterns)) return false; } boolean this_present_tbl_types = true && this.isSetTbl_types(); boolean that_present_tbl_types = true && that.isSetTbl_types(); if (this_present_tbl_types || that_present_tbl_types) { if (!(this_present_tbl_types && that_present_tbl_types)) return false; if (!this.tbl_types.equals(that.tbl_types)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_db_patterns = true && (isSetDb_patterns()); list.add(present_db_patterns); if (present_db_patterns) list.add(db_patterns); boolean present_tbl_patterns = true && (isSetTbl_patterns()); list.add(present_tbl_patterns); if (present_tbl_patterns) list.add(tbl_patterns); boolean present_tbl_types = true && (isSetTbl_types()); list.add(present_tbl_types); if (present_tbl_types) list.add(tbl_types); return list.hashCode(); } @Override public int compareTo(get_table_meta_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_patterns()).compareTo(other.isSetDb_patterns()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_patterns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_patterns, other.db_patterns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_patterns()).compareTo(other.isSetTbl_patterns()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_patterns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_patterns, other.tbl_patterns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_types()).compareTo(other.isSetTbl_types()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_types()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_types, other.tbl_types); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_meta_args("); boolean first = true; sb.append("db_patterns:"); if (this.db_patterns == null) { sb.append("null"); } else { sb.append(this.db_patterns); } first = false; if (!first) sb.append(", "); sb.append("tbl_patterns:"); if (this.tbl_patterns == null) { sb.append("null"); } else { sb.append(this.tbl_patterns); } first = false; if (!first) sb.append(", "); sb.append("tbl_types:"); if (this.tbl_types == null) { sb.append("null"); } else { sb.append(this.tbl_types); } 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_meta_argsStandardSchemeFactory implements SchemeFactory { public get_table_meta_argsStandardScheme getScheme() { return new get_table_meta_argsStandardScheme(); } } private static class get_table_meta_argsStandardScheme extends StandardScheme<get_table_meta_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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_PATTERNS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.db_patterns = iprot.readString(); struct.setDb_patternsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TBL_PATTERNS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tbl_patterns = iprot.readString(); struct.setTbl_patternsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TBL_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list772 = iprot.readListBegin(); struct.tbl_types = new ArrayList<String>(_list772.size); String _elem773; for (int _i774 = 0; _i774 < _list772.size; ++_i774) { _elem773 = iprot.readString(); struct.tbl_types.add(_elem773); } iprot.readListEnd(); } struct.setTbl_typesIsSet(true); } else { 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_meta_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.db_patterns != null) { oprot.writeFieldBegin(DB_PATTERNS_FIELD_DESC); oprot.writeString(struct.db_patterns); oprot.writeFieldEnd(); } if (struct.tbl_patterns != null) { oprot.writeFieldBegin(TBL_PATTERNS_FIELD_DESC); oprot.writeString(struct.tbl_patterns); oprot.writeFieldEnd(); } if (struct.tbl_types != null) { oprot.writeFieldBegin(TBL_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_types.size())); for (String _iter775 : struct.tbl_types) { oprot.writeString(_iter775); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_table_meta_argsTupleSchemeFactory implements SchemeFactory { public get_table_meta_argsTupleScheme getScheme() { return new get_table_meta_argsTupleScheme(); } } private static class get_table_meta_argsTupleScheme extends TupleScheme<get_table_meta_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDb_patterns()) { optionals.set(0); } if (struct.isSetTbl_patterns()) { optionals.set(1); } if (struct.isSetTbl_types()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetDb_patterns()) { oprot.writeString(struct.db_patterns); } if (struct.isSetTbl_patterns()) { oprot.writeString(struct.tbl_patterns); } if (struct.isSetTbl_types()) { { oprot.writeI32(struct.tbl_types.size()); for (String _iter776 : struct.tbl_types) { oprot.writeString(_iter776); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.db_patterns = iprot.readString(); struct.setDb_patternsIsSet(true); } if (incoming.get(1)) { struct.tbl_patterns = iprot.readString(); struct.setTbl_patternsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list777 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tbl_types = new ArrayList<String>(_list777.size); String _elem778; for (int _i779 = 0; _i779 < _list777.size; ++_i779) { _elem778 = iprot.readString(); struct.tbl_types.add(_elem778); } } struct.setTbl_typesIsSet(true); } } } } public static class get_table_meta_result implements org.apache.thrift.TBase<get_table_meta_result, get_table_meta_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_meta_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_meta_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_meta_resultTupleSchemeFactory()); } private List<TableMeta> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, TableMeta.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_table_meta_result.class, metaDataMap); } public get_table_meta_result() { } public get_table_meta_result( List<TableMeta> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_table_meta_result(get_table_meta_result other) { if (other.isSetSuccess()) { List<TableMeta> __this__success = new ArrayList<TableMeta>(other.success.size()); for (TableMeta other_element : other.success) { __this__success.add(new TableMeta(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_table_meta_result deepCopy() { return new get_table_meta_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<TableMeta> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(TableMeta elem) { if (this.success == null) { this.success = new ArrayList<TableMeta>(); } this.success.add(elem); } public List<TableMeta> getSuccess() { return this.success; } public void setSuccess(List<TableMeta> 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<TableMeta>)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_table_meta_result) return this.equals((get_table_meta_result)that); return false; } public boolean equals(get_table_meta_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_table_meta_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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_table_meta_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_table_meta_resultStandardSchemeFactory implements SchemeFactory { public get_table_meta_resultStandardScheme getScheme() { return new get_table_meta_resultStandardScheme(); } } private static class get_table_meta_resultStandardScheme extends StandardScheme<get_table_meta_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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 _list780 = iprot.readListBegin(); struct.success = new ArrayList<TableMeta>(_list780.size); TableMeta _elem781; for (int _i782 = 0; _i782 < _list780.size; ++_i782) { _elem781 = new TableMeta(); _elem781.read(iprot); struct.success.add(_elem781); } 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_table_meta_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 (TableMeta _iter783 : struct.success) { _iter783.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 get_table_meta_resultTupleSchemeFactory implements SchemeFactory { public get_table_meta_resultTupleScheme getScheme() { return new get_table_meta_resultTupleScheme(); } } private static class get_table_meta_resultTupleScheme extends TupleScheme<get_table_meta_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 (TableMeta _iter784 : struct.success) { _iter784.write(oprot); } } } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 _list785 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<TableMeta>(_list785.size); TableMeta _elem786; for (int _i787 = 0; _i787 < _list785.size; ++_i787) { _elem786 = new TableMeta(); _elem786.read(iprot); struct.success.add(_elem786); } } 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<get_all_tables_args, get_all_tables_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_tables_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); return list.hashCode(); } @Override public int compareTo(get_all_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.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<get_all_tables_args> { 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<get_all_tables_args> { @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<get_all_tables_result, get_all_tables_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_tables_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_tables_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_tables_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_all_tables_result(get_all_tables_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_all_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_all_tables_result> { 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 _list788 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list788.size); String _elem789; for (int _i790 = 0; _i790 < _list788.size; ++_i790) { _elem789 = iprot.readString(); struct.success.add(_elem789); } 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 _iter791 : struct.success) { oprot.writeString(_iter791); } 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<get_all_tables_result> { @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 _iter792 : struct.success) { oprot.writeString(_iter792); } } } 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 _list793 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list793.size); String _elem794; for (int _i795 = 0; _i795 < _list793.size; ++_i795) { _elem794 = iprot.readString(); struct.success.add(_elem794); } } 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<get_table_args, get_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); return list.hashCode(); } @Override public int compareTo(get_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.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<get_table_args> { 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<get_table_args> { @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<get_table_result, get_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_table_result> { 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<get_table_result> { @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<get_table_objects_by_name_args, get_table_objects_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_objects_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> tbl_names) { this(); this.dbname = dbname; this.tbl_names = tbl_names; } /** * Performs a deep copy on <i>other</i>. */ 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<String> __this__tbl_names = new ArrayList<String>(other.tbl_names); 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<String> 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<String>(); } this.tbl_names.add(elem); } public List<String> getTbl_names() { return this.tbl_names; } public void setTbl_names(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_tbl_names = true && (isSetTbl_names()); list.add(present_tbl_names); if (present_tbl_names) list.add(tbl_names); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_names()).compareTo(other.isSetTbl_names()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_names, other.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<get_table_objects_by_name_args> { 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 _list796 = iprot.readListBegin(); struct.tbl_names = new ArrayList<String>(_list796.size); String _elem797; for (int _i798 = 0; _i798 < _list796.size; ++_i798) { _elem797 = iprot.readString(); struct.tbl_names.add(_elem797); } 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 _iter799 : struct.tbl_names) { oprot.writeString(_iter799); } 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<get_table_objects_by_name_args> { @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 _iter800 : struct.tbl_names) { oprot.writeString(_iter800); } } } } @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 _list801 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tbl_names = new ArrayList<String>(_list801.size); String _elem802; for (int _i803 = 0; _i803 < _list801.size; ++_i803) { _elem802 = iprot.readString(); struct.tbl_names.add(_elem802); } } struct.setTbl_namesIsSet(true); } } } } public static class get_table_objects_by_name_result implements org.apache.thrift.TBase<get_table_objects_by_name_result, get_table_objects_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_objects_by_name_result> { 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<Table> success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); 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<Table> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_table_objects_by_name_result(get_table_objects_by_name_result other) { if (other.isSetSuccess()) { List<Table> __this__success = new ArrayList<Table>(other.success.size()); for (Table other_element : other.success) { __this__success.add(new Table(other_element)); } this.success = __this__success; } } public get_table_objects_by_name_result deepCopy() { return new get_table_objects_by_name_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<Table> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Table elem) { if (this.success == null) { this.success = new ArrayList<Table>(); } this.success.add(elem); } public List<Table> getSuccess() { return this.success; } public void setSuccess(List<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 void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<Table>)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_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_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; 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<get_table_objects_by_name_result> { 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 _list804 = iprot.readListBegin(); struct.success = new ArrayList<Table>(_list804.size); Table _elem805; for (int _i806 = 0; _i806 < _list804.size; ++_i806) { _elem805 = new Table(); _elem805.read(iprot); struct.success.add(_elem805); } iprot.readListEnd(); } 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_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 _iter807 : struct.success) { _iter807.write(oprot); } oprot.writeListEnd(); } 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<get_table_objects_by_name_result> { @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); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Table _iter808 : struct.success) { _iter808.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(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list809 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Table>(_list809.size); Table _elem810; for (int _i811 = 0; _i811 < _list809.size; ++_i811) { _elem810 = new Table(); _elem810.read(iprot); struct.success.add(_elem810); } } struct.setSuccessIsSet(true); } } } } public static class get_table_req_args implements org.apache.thrift.TBase<get_table_req_args, get_table_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_req_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_req_argsTupleSchemeFactory()); } private GetTableRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, GetTableRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_req_args.class, metaDataMap); } public get_table_req_args() { } public get_table_req_args( GetTableRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public get_table_req_args(get_table_req_args other) { if (other.isSetReq()) { this.req = new GetTableRequest(other.req); } } public get_table_req_args deepCopy() { return new get_table_req_args(this); } @Override public void clear() { this.req = null; } public GetTableRequest getReq() { return this.req; } public void setReq(GetTableRequest 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((GetTableRequest)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_table_req_args) return this.equals((get_table_req_args)that); return false; } public boolean equals(get_table_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(get_table_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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_table_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 get_table_req_argsStandardSchemeFactory implements SchemeFactory { public get_table_req_argsStandardScheme getScheme() { return new get_table_req_argsStandardScheme(); } } private static class get_table_req_argsStandardScheme extends StandardScheme<get_table_req_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_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 GetTableRequest(); 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_table_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 get_table_req_argsTupleSchemeFactory implements SchemeFactory { public get_table_req_argsTupleScheme getScheme() { return new get_table_req_argsTupleScheme(); } } private static class get_table_req_argsTupleScheme extends TupleScheme<get_table_req_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_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, get_table_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new GetTableRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class get_table_req_result implements org.apache.thrift.TBase<get_table_req_result, get_table_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_req_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_req_resultTupleSchemeFactory()); } private GetTableResult 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, GetTableResult.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_req_result.class, metaDataMap); } public get_table_req_result() { } public get_table_req_result( GetTableResult success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_table_req_result(get_table_req_result other) { if (other.isSetSuccess()) { this.success = new GetTableResult(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_table_req_result deepCopy() { return new get_table_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public GetTableResult getSuccess() { return this.success; } public void setSuccess(GetTableResult 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((GetTableResult)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_req_result) return this.equals((get_table_req_result)that); return false; } public boolean equals(get_table_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_table_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_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_req_resultStandardSchemeFactory implements SchemeFactory { public get_table_req_resultStandardScheme getScheme() { return new get_table_req_resultStandardScheme(); } } private static class get_table_req_resultStandardScheme extends StandardScheme<get_table_req_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_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 GetTableResult(); 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_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_req_resultTupleSchemeFactory implements SchemeFactory { public get_table_req_resultTupleScheme getScheme() { return new get_table_req_resultTupleScheme(); } } private static class get_table_req_resultTupleScheme extends TupleScheme<get_table_req_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_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_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new GetTableResult(); 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_req_args implements org.apache.thrift.TBase<get_table_objects_by_name_req_args, get_table_objects_by_name_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_objects_by_name_req_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_objects_by_name_req_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_objects_by_name_req_argsTupleSchemeFactory()); } private GetTablesRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, GetTablesRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_req_args.class, metaDataMap); } public get_table_objects_by_name_req_args() { } public get_table_objects_by_name_req_args( GetTablesRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public get_table_objects_by_name_req_args(get_table_objects_by_name_req_args other) { if (other.isSetReq()) { this.req = new GetTablesRequest(other.req); } } public get_table_objects_by_name_req_args deepCopy() { return new get_table_objects_by_name_req_args(this); } @Override public void clear() { this.req = null; } public GetTablesRequest getReq() { return this.req; } public void setReq(GetTablesRequest 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((GetTablesRequest)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_table_objects_by_name_req_args) return this.equals((get_table_objects_by_name_req_args)that); return false; } public boolean equals(get_table_objects_by_name_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(get_table_objects_by_name_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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_table_objects_by_name_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 get_table_objects_by_name_req_argsStandardSchemeFactory implements SchemeFactory { public get_table_objects_by_name_req_argsStandardScheme getScheme() { return new get_table_objects_by_name_req_argsStandardScheme(); } } private static class get_table_objects_by_name_req_argsStandardScheme extends StandardScheme<get_table_objects_by_name_req_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_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 GetTablesRequest(); 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_table_objects_by_name_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 get_table_objects_by_name_req_argsTupleSchemeFactory implements SchemeFactory { public get_table_objects_by_name_req_argsTupleScheme getScheme() { return new get_table_objects_by_name_req_argsTupleScheme(); } } private static class get_table_objects_by_name_req_argsTupleScheme extends TupleScheme<get_table_objects_by_name_req_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_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, get_table_objects_by_name_req_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new GetTablesRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class get_table_objects_by_name_req_result implements org.apache.thrift.TBase<get_table_objects_by_name_req_result, get_table_objects_by_name_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_objects_by_name_req_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_table_objects_by_name_req_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_table_objects_by_name_req_resultTupleSchemeFactory()); } private GetTablesResult 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, GetTablesResult.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_req_result.class, metaDataMap); } public get_table_objects_by_name_req_result() { } public get_table_objects_by_name_req_result( GetTablesResult 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 <i>other</i>. */ public get_table_objects_by_name_req_result(get_table_objects_by_name_req_result other) { if (other.isSetSuccess()) { this.success = new GetTablesResult(other.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_req_result deepCopy() { return new get_table_objects_by_name_req_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public GetTablesResult getSuccess() { return this.success; } public void setSuccess(GetTablesResult 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((GetTablesResult)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_req_result) return this.equals((get_table_objects_by_name_req_result)that); return false; } public boolean equals(get_table_objects_by_name_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(get_table_objects_by_name_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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_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 get_table_objects_by_name_req_resultStandardSchemeFactory implements SchemeFactory { public get_table_objects_by_name_req_resultStandardScheme getScheme() { return new get_table_objects_by_name_req_resultStandardScheme(); } } private static class get_table_objects_by_name_req_resultStandardScheme extends StandardScheme<get_table_objects_by_name_req_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_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 GetTablesResult(); 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 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_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 get_table_objects_by_name_req_resultTupleSchemeFactory implements SchemeFactory { public get_table_objects_by_name_req_resultTupleScheme getScheme() { return new get_table_objects_by_name_req_resultTupleScheme(); } } private static class get_table_objects_by_name_req_resultTupleScheme extends TupleScheme<get_table_objects_by_name_req_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_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, get_table_objects_by_name_req_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new GetTablesResult(); 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 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<get_table_names_by_filter_args, get_table_names_by_filter_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_names_by_filter_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_filter = true && (isSetFilter()); list.add(present_filter); if (present_filter) list.add(filter); boolean present_max_tables = true; list.add(present_max_tables); if (present_max_tables) list.add(max_tables); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(other.isSetMax_tables()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_tables()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_tables, other.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<get_table_names_by_filter_args> { 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<get_table_names_by_filter_args> { @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<get_table_names_by_filter_result, get_table_names_by_filter_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_names_by_filter_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> 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 <i>other</i>. */ public get_table_names_by_filter_result(get_table_names_by_filter_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<get_table_names_by_filter_result> { 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 _list812 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list812.size); String _elem813; for (int _i814 = 0; _i814 < _list812.size; ++_i814) { _elem813 = iprot.readString(); struct.success.add(_elem813); } 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 _iter815 : struct.success) { oprot.writeString(_iter815); } 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<get_table_names_by_filter_result> { @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 _iter816 : struct.success) { oprot.writeString(_iter816); } } } 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 _list817 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list817.size); String _elem818; for (int _i819 = 0; _i819 < _list817.size; ++_i819) { _elem818 = iprot.readString(); struct.success.add(_elem818); } } 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<alter_table_args, alter_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); list.add(present_new_tbl); if (present_new_tbl) list.add(new_tbl); return list.hashCode(); } @Override public int compareTo(alter_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.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<alter_table_args> { 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<alter_table_args> { @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<alter_table_result, alter_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_table_result> { 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<alter_table_result> { @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<alter_table_with_environment_context_args, alter_table_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); list.add(present_new_tbl); if (present_new_tbl) list.add(new_tbl); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<alter_table_with_environment_context_args> { 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<alter_table_with_environment_context_args> { @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<alter_table_with_environment_context_result, alter_table_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_table_with_environment_context_result> { 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<alter_table_with_environment_context_result> { @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<alter_table_with_cascade_args, alter_table_with_cascade_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_with_cascade_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_tbl = true && (isSetNew_tbl()); list.add(present_new_tbl); if (present_new_tbl) list.add(new_tbl); boolean present_cascade = true; list.add(present_cascade); if (present_cascade) list.add(cascade); return list.hashCode(); } @Override public int compareTo(alter_table_with_cascade_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.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<alter_table_with_cascade_args> { 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<alter_table_with_cascade_args> { @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<alter_table_with_cascade_result, alter_table_with_cascade_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_table_with_cascade_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_table_with_cascade_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_table_with_cascade_result> { 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<alter_table_with_cascade_result> { @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<add_partition_args, add_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_new_part = true && (isSetNew_part()); list.add(present_new_part); if (present_new_part) list.add(new_part); return list.hashCode(); } @Override public int compareTo(add_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.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<add_partition_args> { 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<add_partition_args> { @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<add_partition_result, add_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(add_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_partition_result> { 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<add_partition_result> { @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<add_partition_with_environment_context_args, add_partition_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_partition_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_new_part = true && (isSetNew_part()); list.add(present_new_part); if (present_new_part) list.add(new_part); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<add_partition_with_environment_context_args> { 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<add_partition_with_environment_context_args> { @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<add_partition_with_environment_context_result, add_partition_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_partition_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_partition_with_environment_context_result> { 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<add_partition_with_environment_context_result> { @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<add_partitions_args, add_partitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_argsTupleSchemeFactory()); } private List<Partition> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<Partition> new_parts) { this(); this.new_parts = new_parts; } /** * Performs a deep copy on <i>other</i>. */ public add_partitions_args(add_partitions_args other) { if (other.isSetNew_parts()) { List<Partition> __this__new_parts = new ArrayList<Partition>(other.new_parts.size()); 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<Partition> 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<Partition>(); } this.new_parts.add(elem); } public List<Partition> getNew_parts() { return this.new_parts; } public void setNew_parts(List<Partition> 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<Partition>)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() { List<Object> list = new ArrayList<Object>(); boolean present_new_parts = true && (isSetNew_parts()); list.add(present_new_parts); if (present_new_parts) list.add(new_parts); return list.hashCode(); } @Override public int compareTo(add_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.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<add_partitions_args> { 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 _list820 = iprot.readListBegin(); struct.new_parts = new ArrayList<Partition>(_list820.size); Partition _elem821; for (int _i822 = 0; _i822 < _list820.size; ++_i822) { _elem821 = new Partition(); _elem821.read(iprot); struct.new_parts.add(_elem821); } 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 _iter823 : struct.new_parts) { _iter823.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<add_partitions_args> { @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 _iter824 : struct.new_parts) { _iter824.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 _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList<Partition>(_list825.size); Partition _elem826; for (int _i827 = 0; _i827 < _list825.size; ++_i827) { _elem826 = new Partition(); _elem826.read(iprot); struct.new_parts.add(_elem826); } } struct.setNew_partsIsSet(true); } } } } public static class add_partitions_result implements org.apache.thrift.TBase<add_partitions_result, add_partitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(add_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_partitions_result> { 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<add_partitions_result> { @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<add_partitions_pspec_args, add_partitions_pspec_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_pspec_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_partitions_pspec_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_partitions_pspec_argsTupleSchemeFactory()); } private List<PartitionSpec> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<PartitionSpec> new_parts) { this(); this.new_parts = new_parts; } /** * Performs a deep copy on <i>other</i>. */ public add_partitions_pspec_args(add_partitions_pspec_args other) { if (other.isSetNew_parts()) { List<PartitionSpec> __this__new_parts = new ArrayList<PartitionSpec>(other.new_parts.size()); 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<PartitionSpec> 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<PartitionSpec>(); } this.new_parts.add(elem); } public List<PartitionSpec> getNew_parts() { return this.new_parts; } public void setNew_parts(List<PartitionSpec> 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<PartitionSpec>)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() { List<Object> list = new ArrayList<Object>(); boolean present_new_parts = true && (isSetNew_parts()); list.add(present_new_parts); if (present_new_parts) list.add(new_parts); return list.hashCode(); } @Override public int compareTo(add_partitions_pspec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.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<add_partitions_pspec_args> { 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 _list828 = iprot.readListBegin(); struct.new_parts = new ArrayList<PartitionSpec>(_list828.size); PartitionSpec _elem829; for (int _i830 = 0; _i830 < _list828.size; ++_i830) { _elem829 = new PartitionSpec(); _elem829.read(iprot); struct.new_parts.add(_elem829); } 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 _iter831 : struct.new_parts) { _iter831.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<add_partitions_pspec_args> { @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 _iter832 : struct.new_parts) { _iter832.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 _list833 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList<PartitionSpec>(_list833.size); PartitionSpec _elem834; for (int _i835 = 0; _i835 < _list833.size; ++_i835) { _elem834 = new PartitionSpec(); _elem834.read(iprot); struct.new_parts.add(_elem834); } } struct.setNew_partsIsSet(true); } } } } public static class add_partitions_pspec_result implements org.apache.thrift.TBase<add_partitions_pspec_result, add_partitions_pspec_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_pspec_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(add_partitions_pspec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_partitions_pspec_result> { 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<add_partitions_pspec_result> { @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<append_partition_args, append_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> part_vals) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } /** * Performs a deep copy on <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); return list.hashCode(); } @Override public int compareTo(append_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.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<append_partition_args> { 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 _list836 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list836.size); String _elem837; for (int _i838 = 0; _i838 < _list836.size; ++_i838) { _elem837 = iprot.readString(); struct.part_vals.add(_elem837); } 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 _iter839 : struct.part_vals) { oprot.writeString(_iter839); } 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<append_partition_args> { @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 _iter840 : struct.part_vals) { oprot.writeString(_iter840); } } } } @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 _list841 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list841.size); String _elem842; for (int _i843 = 0; _i843 < _list841.size; ++_i843) { _elem842 = iprot.readString(); struct.part_vals.add(_elem842); } } struct.setPart_valsIsSet(true); } } } } public static class append_partition_result implements org.apache.thrift.TBase<append_partition_result, append_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(append_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<append_partition_result> { 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<append_partition_result> { @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<add_partitions_req_args, add_partitions_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_req_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(add_partitions_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<add_partitions_req_args> { 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<add_partitions_req_args> { @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<add_partitions_req_result, add_partitions_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_partitions_req_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(add_partitions_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_partitions_req_result> { 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<add_partitions_req_result> { @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<append_partition_with_environment_context_args, append_partition_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<append_partition_with_environment_context_args> { 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 _list844 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list844.size); String _elem845; for (int _i846 = 0; _i846 < _list844.size; ++_i846) { _elem845 = iprot.readString(); struct.part_vals.add(_elem845); } 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 _iter847 : struct.part_vals) { oprot.writeString(_iter847); } 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<append_partition_with_environment_context_args> { @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 _iter848 : struct.part_vals) { oprot.writeString(_iter848); } } } 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 _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list849.size); String _elem850; for (int _i851 = 0; _i851 < _list849.size; ++_i851) { _elem850 = iprot.readString(); struct.part_vals.add(_elem850); } } 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<append_partition_with_environment_context_result, append_partition_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<append_partition_with_environment_context_result> { 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<append_partition_with_environment_context_result> { @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<append_partition_by_name_args, append_partition_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); return list.hashCode(); } @Override public int compareTo(append_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.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<append_partition_by_name_args> { 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<append_partition_by_name_args> { @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<append_partition_by_name_result, append_partition_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_by_name_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(append_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<append_partition_by_name_result> { 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<append_partition_by_name_result> { @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<append_partition_by_name_with_environment_context_args, append_partition_by_name_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_by_name_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<append_partition_by_name_with_environment_context_args> { 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<append_partition_by_name_with_environment_context_args> { @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<append_partition_by_name_with_environment_context_result, append_partition_by_name_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<append_partition_by_name_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<append_partition_by_name_with_environment_context_result> { 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<append_partition_by_name_with_environment_context_result> { @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<drop_partition_args, drop_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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_VALS: return getPart_vals(); case DELETE_DATA: return 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); return list.hashCode(); } @Override public int compareTo(drop_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.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<drop_partition_args> { 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 _list852 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list852.size); String _elem853; for (int _i854 = 0; _i854 < _list852.size; ++_i854) { _elem853 = iprot.readString(); struct.part_vals.add(_elem853); } 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 _iter855 : struct.part_vals) { oprot.writeString(_iter855); } 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<drop_partition_args> { @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 _iter856 : struct.part_vals) { oprot.writeString(_iter856); } } } 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 _list857 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list857.size); String _elem858; for (int _i859 = 0; _i859 < _list857.size; ++_i859) { _elem858 = iprot.readString(); struct.part_vals.add(_elem858); } } 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<drop_partition_result, drop_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(drop_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_partition_result> { 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<drop_partition_result> { @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<drop_partition_with_environment_context_args, drop_partition_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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_VALS: return getPart_vals(); case DELETE_DATA: return 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<drop_partition_with_environment_context_args> { 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 _list860 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list860.size); String _elem861; for (int _i862 = 0; _i862 < _list860.size; ++_i862) { _elem861 = iprot.readString(); struct.part_vals.add(_elem861); } 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 _iter863 : struct.part_vals) { oprot.writeString(_iter863); } 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<drop_partition_with_environment_context_args> { @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 _iter864 : struct.part_vals) { oprot.writeString(_iter864); } } } 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 _list865 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list865.size); String _elem866; for (int _i867 = 0; _i867 < _list865.size; ++_i867) { _elem866 = iprot.readString(); struct.part_vals.add(_elem866); } } 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<drop_partition_with_environment_context_result, drop_partition_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_partition_with_environment_context_result> { 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<drop_partition_with_environment_context_result> { @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<drop_partition_by_name_args, drop_partition_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); return list.hashCode(); } @Override public int compareTo(drop_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.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<drop_partition_by_name_args> { 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<drop_partition_by_name_args> { @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<drop_partition_by_name_result, drop_partition_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_by_name_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(drop_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_partition_by_name_result> { 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<drop_partition_by_name_result> { @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<drop_partition_by_name_with_environment_context_args, drop_partition_by_name_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_by_name_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<drop_partition_by_name_with_environment_context_args> { 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<drop_partition_by_name_with_environment_context_args> { @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<drop_partition_by_name_with_environment_context_result, drop_partition_by_name_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partition_by_name_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_partition_by_name_with_environment_context_result> { 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<drop_partition_by_name_with_environment_context_result> { @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<drop_partitions_req_args, drop_partitions_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partitions_req_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(drop_partitions_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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<drop_partitions_req_args> { 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<drop_partitions_req_args> { @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<drop_partitions_req_result, drop_partitions_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_partitions_req_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(drop_partitions_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_partitions_req_result> { 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<drop_partitions_req_result> { @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<get_partition_args, get_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> part_vals) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.part_vals = part_vals; } /** * Performs a deep copy on <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); return list.hashCode(); } @Override public int compareTo(get_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.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<get_partition_args> { 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 _list868 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list868.size); String _elem869; for (int _i870 = 0; _i870 < _list868.size; ++_i870) { _elem869 = iprot.readString(); struct.part_vals.add(_elem869); } 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 _iter871 : struct.part_vals) { oprot.writeString(_iter871); } 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<get_partition_args> { @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 _iter872 : struct.part_vals) { oprot.writeString(_iter872); } } } } @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 _list873 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list873.size); String _elem874; for (int _i875 = 0; _i875 < _list873.size; ++_i875) { _elem874 = iprot.readString(); struct.part_vals.add(_elem874); } } struct.setPart_valsIsSet(true); } } } } public static class get_partition_result implements org.apache.thrift.TBase<get_partition_result, get_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partition_result> { 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<get_partition_result> { @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<exchange_partition_args, exchange_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<exchange_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new exchange_partition_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new exchange_partition_argsTupleSchemeFactory()); } private Map<String,String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String,String> 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 <i>other</i>. */ public exchange_partition_args(exchange_partition_args other) { if (other.isSetPartitionSpecs()) { Map<String,String> __this__partitionSpecs = new HashMap<String,String>(other.partitionSpecs); 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<String,String>(); } this.partitionSpecs.put(key, val); } public Map<String,String> getPartitionSpecs() { return this.partitionSpecs; } public void setPartitionSpecs(Map<String,String> 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<String,String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_partitionSpecs = true && (isSetPartitionSpecs()); list.add(present_partitionSpecs); if (present_partitionSpecs) list.add(partitionSpecs); boolean present_source_db = true && (isSetSource_db()); list.add(present_source_db); if (present_source_db) list.add(source_db); boolean present_source_table_name = true && (isSetSource_table_name()); list.add(present_source_table_name); if (present_source_table_name) list.add(source_table_name); boolean present_dest_db = true && (isSetDest_db()); list.add(present_dest_db); if (present_dest_db) list.add(dest_db); boolean present_dest_table_name = true && (isSetDest_table_name()); list.add(present_dest_table_name); if (present_dest_table_name) list.add(dest_table_name); return list.hashCode(); } @Override public int compareTo(exchange_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); if (lastComparison != 0) { return lastComparison; } if (isSetPartitionSpecs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.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<exchange_partition_args> { 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 _map876 = iprot.readMapBegin(); struct.partitionSpecs = new HashMap<String,String>(2*_map876.size); String _key877; String _val878; for (int _i879 = 0; _i879 < _map876.size; ++_i879) { _key877 = iprot.readString(); _val878 = iprot.readString(); struct.partitionSpecs.put(_key877, _val878); } 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<String, String> _iter880 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter880.getKey()); oprot.writeString(_iter880.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<exchange_partition_args> { @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<String, String> _iter881 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter881.getKey()); oprot.writeString(_iter881.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 _map882 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.partitionSpecs = new HashMap<String,String>(2*_map882.size); String _key883; String _val884; for (int _i885 = 0; _i885 < _map882.size; ++_i885) { _key883 = iprot.readString(); _val884 = iprot.readString(); struct.partitionSpecs.put(_key883, _val884); } } 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<exchange_partition_result, exchange_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<exchange_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(exchange_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<exchange_partition_result> { 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<exchange_partition_result> { @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 exchange_partitions_args implements org.apache.thrift.TBase<exchange_partitions_args, exchange_partitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<exchange_partitions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partitions_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new exchange_partitions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new exchange_partitions_argsTupleSchemeFactory()); } private Map<String,String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_partitions_args.class, metaDataMap); } public exchange_partitions_args() { } public exchange_partitions_args( Map<String,String> 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 <i>other</i>. */ public exchange_partitions_args(exchange_partitions_args other) { if (other.isSetPartitionSpecs()) { Map<String,String> __this__partitionSpecs = new HashMap<String,String>(other.partitionSpecs); 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_partitions_args deepCopy() { return new exchange_partitions_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<String,String>(); } this.partitionSpecs.put(key, val); } public Map<String,String> getPartitionSpecs() { return this.partitionSpecs; } public void setPartitionSpecs(Map<String,String> 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<String,String>)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_partitions_args) return this.equals((exchange_partitions_args)that); return false; } public boolean equals(exchange_partitions_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() { List<Object> list = new ArrayList<Object>(); boolean present_partitionSpecs = true && (isSetPartitionSpecs()); list.add(present_partitionSpecs); if (present_partitionSpecs) list.add(partitionSpecs); boolean present_source_db = true && (isSetSource_db()); list.add(present_source_db); if (present_source_db) list.add(source_db); boolean present_source_table_name = true && (isSetSource_table_name()); list.add(present_source_table_name); if (present_source_table_name) list.add(source_table_name); boolean present_dest_db = true && (isSetDest_db()); list.add(present_dest_db); if (present_dest_db) list.add(dest_db); boolean present_dest_table_name = true && (isSetDest_table_name()); list.add(present_dest_table_name); if (present_dest_table_name) list.add(dest_table_name); return list.hashCode(); } @Override public int compareTo(exchange_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); if (lastComparison != 0) { return lastComparison; } if (isSetPartitionSpecs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetSource_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_db()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDest_table_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.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_partitions_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_partitions_argsStandardSchemeFactory implements SchemeFactory { public exchange_partitions_argsStandardScheme getScheme() { return new exchange_partitions_argsStandardScheme(); } } private static class exchange_partitions_argsStandardScheme extends StandardScheme<exchange_partitions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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: // PARTITION_SPECS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map886 = iprot.readMapBegin(); struct.partitionSpecs = new HashMap<String,String>(2*_map886.size); String _key887; String _val888; for (int _i889 = 0; _i889 < _map886.size; ++_i889) { _key887 = iprot.readString(); _val888 = iprot.readString(); struct.partitionSpecs.put(_key887, _val888); } 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_partitions_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<String, String> _iter890 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter890.getKey()); oprot.writeString(_iter890.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_partitions_argsTupleSchemeFactory implements SchemeFactory { public exchange_partitions_argsTupleScheme getScheme() { return new exchange_partitions_argsTupleScheme(); } } private static class exchange_partitions_argsTupleScheme extends TupleScheme<exchange_partitions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partitions_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<String, String> _iter891 : struct.partitionSpecs.entrySet()) { oprot.writeString(_iter891.getKey()); oprot.writeString(_iter891.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_partitions_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 _map892 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.partitionSpecs = new HashMap<String,String>(2*_map892.size); String _key893; String _val894; for (int _i895 = 0; _i895 < _map892.size; ++_i895) { _key893 = iprot.readString(); _val894 = iprot.readString(); struct.partitionSpecs.put(_key893, _val894); } } 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_partitions_result implements org.apache.thrift.TBase<exchange_partitions_result, exchange_partitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<exchange_partitions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_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 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new exchange_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new exchange_partitions_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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.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))); 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_partitions_result.class, metaDataMap); } public exchange_partitions_result() { } public exchange_partitions_result( List<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 <i>other</i>. */ public exchange_partitions_result(exchange_partitions_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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); } if (other.isSetO3()) { this.o3 = new InvalidObjectException(other.o3); } if (other.isSetO4()) { this.o4 = new InvalidInputException(other.o4); } } public exchange_partitions_result deepCopy() { return new exchange_partitions_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; this.o4 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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((List<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_partitions_result) return this.equals((exchange_partitions_result)that); return false; } public boolean equals(exchange_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; } 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(exchange_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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_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; 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 exchange_partitions_resultStandardSchemeFactory implements SchemeFactory { public exchange_partitions_resultStandardScheme getScheme() { return new exchange_partitions_resultStandardScheme(); } } private static class exchange_partitions_resultStandardScheme extends StandardScheme<exchange_partitions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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 _list896 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list896.size); Partition _elem897; for (int _i898 = 0; _i898 < _list896.size; ++_i898) { _elem897 = new Partition(); _elem897.read(iprot); struct.success.add(_elem897); } 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; 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_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 _iter899 : struct.success) { _iter899.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(); } if (struct.o4 != null) { oprot.writeFieldBegin(O4_FIELD_DESC); struct.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class exchange_partitions_resultTupleSchemeFactory implements SchemeFactory { public exchange_partitions_resultTupleScheme getScheme() { return new exchange_partitions_resultTupleScheme(); } } private static class exchange_partitions_resultTupleScheme extends TupleScheme<exchange_partitions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, exchange_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); } if (struct.isSetO4()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Partition _iter900 : struct.success) { _iter900.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_partitions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list901 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list901.size); Partition _elem902; for (int _i903 = 0; _i903 < _list901.size; ++_i903) { _elem902 = new Partition(); _elem902.read(iprot); struct.success.add(_elem902); } } 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<get_partition_with_auth_args, get_partition_with_auth_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_with_auth_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> part_vals; // required private String user_name; // required private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> part_vals, String user_name, List<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); this.part_vals = __this__part_vals; } if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List<String> __this__group_names = new ArrayList<String>(other.group_names); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<String> 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<String>(); } this.group_names.add(elem); } public List<String> getGroup_names() { return this.group_names; } public void setGroup_names(List<String> 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<String>)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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_user_name = true && (isSetUser_name()); list.add(present_user_name); if (present_user_name) list.add(user_name); boolean present_group_names = true && (isSetGroup_names()); list.add(present_group_names); if (present_group_names) list.add(group_names); return list.hashCode(); } @Override public int compareTo(get_partition_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.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<get_partition_with_auth_args> { 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 _list904 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list904.size); String _elem905; for (int _i906 = 0; _i906 < _list904.size; ++_i906) { _elem905 = iprot.readString(); struct.part_vals.add(_elem905); } 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 _list907 = iprot.readListBegin(); struct.group_names = new ArrayList<String>(_list907.size); String _elem908; for (int _i909 = 0; _i909 < _list907.size; ++_i909) { _elem908 = iprot.readString(); struct.group_names.add(_elem908); } 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 _iter910 : struct.part_vals) { oprot.writeString(_iter910); } 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 _iter911 : struct.group_names) { oprot.writeString(_iter911); } 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<get_partition_with_auth_args> { @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 _iter912 : struct.part_vals) { oprot.writeString(_iter912); } } } if (struct.isSetUser_name()) { oprot.writeString(struct.user_name); } if (struct.isSetGroup_names()) { { oprot.writeI32(struct.group_names.size()); for (String _iter913 : struct.group_names) { oprot.writeString(_iter913); } } } } @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 _list914 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list914.size); String _elem915; for (int _i916 = 0; _i916 < _list914.size; ++_i916) { _elem915 = iprot.readString(); struct.part_vals.add(_elem915); } } 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 _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList<String>(_list917.size); String _elem918; for (int _i919 = 0; _i919 < _list917.size; ++_i919) { _elem918 = iprot.readString(); struct.group_names.add(_elem918); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partition_with_auth_result implements org.apache.thrift.TBase<get_partition_with_auth_result, get_partition_with_auth_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_with_auth_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partition_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partition_with_auth_result> { 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<get_partition_with_auth_result> { @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<get_partition_by_name_args, get_partition_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); return list.hashCode(); } @Override public int compareTo(get_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.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<get_partition_by_name_args> { 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<get_partition_by_name_args> { @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<get_partition_by_name_result, get_partition_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_by_name_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partition_by_name_result> { 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<get_partition_by_name_result> { @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<get_partitions_args, get_partitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partitions_args> { 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<get_partitions_args> { @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<get_partitions_result, get_partitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_resultTupleSchemeFactory()); } private List<Partition> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_result(get_partitions_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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 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<Partition>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_result> { 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 _list920 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list920.size); Partition _elem921; for (int _i922 = 0; _i922 < _list920.size; ++_i922) { _elem921 = new Partition(); _elem921.read(iprot); struct.success.add(_elem921); } 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 _iter923 : struct.success) { _iter923.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<get_partitions_result> { @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 _iter924 : struct.success) { _iter924.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 _list925 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list925.size); Partition _elem926; for (int _i927 = 0; _i927 < _list925.size; ++_i927) { _elem926 = new Partition(); _elem926.read(iprot); struct.success.add(_elem926); } } 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<get_partitions_with_auth_args, get_partitions_with_auth_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_with_auth_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__group_names = new ArrayList<String>(other.group_names); 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<String> 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<String>(); } this.group_names.add(elem); } public List<String> getGroup_names() { return this.group_names; } public void setGroup_names(List<String> 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<String>)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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); boolean present_user_name = true && (isSetUser_name()); list.add(present_user_name); if (present_user_name) list.add(user_name); boolean present_group_names = true && (isSetGroup_names()); list.add(present_group_names); if (present_group_names) list.add(group_names); return list.hashCode(); } @Override public int compareTo(get_partitions_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.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<get_partitions_with_auth_args> { 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 _list928 = iprot.readListBegin(); struct.group_names = new ArrayList<String>(_list928.size); String _elem929; for (int _i930 = 0; _i930 < _list928.size; ++_i930) { _elem929 = iprot.readString(); struct.group_names.add(_elem929); } 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 _iter931 : struct.group_names) { oprot.writeString(_iter931); } 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<get_partitions_with_auth_args> { @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 _iter932 : struct.group_names) { oprot.writeString(_iter932); } } } } @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 _list933 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList<String>(_list933.size); String _elem934; for (int _i935 = 0; _i935 < _list933.size; ++_i935) { _elem934 = iprot.readString(); struct.group_names.add(_elem934); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partitions_with_auth_result implements org.apache.thrift.TBase<get_partitions_with_auth_result, get_partitions_with_auth_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_with_auth_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_with_auth_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_with_auth_resultTupleSchemeFactory()); } private List<Partition> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_with_auth_result(get_partitions_with_auth_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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 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<Partition>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_with_auth_result> { 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 _list936 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list936.size); Partition _elem937; for (int _i938 = 0; _i938 < _list936.size; ++_i938) { _elem937 = new Partition(); _elem937.read(iprot); struct.success.add(_elem937); } 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 _iter939 : struct.success) { _iter939.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<get_partitions_with_auth_result> { @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 _iter940 : struct.success) { _iter940.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 _list941 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list941.size); Partition _elem942; for (int _i943 = 0; _i943 < _list941.size; ++_i943) { _elem942 = new Partition(); _elem942.read(iprot); struct.success.add(_elem942); } } 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<get_partitions_pspec_args, get_partitions_pspec_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_pspec_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partitions_pspec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partitions_pspec_args> { 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<get_partitions_pspec_args> { @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<get_partitions_pspec_result, get_partitions_pspec_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_pspec_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_pspec_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_pspec_resultTupleSchemeFactory()); } private List<PartitionSpec> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<PartitionSpec> success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_pspec_result(get_partitions_pspec_result other) { if (other.isSetSuccess()) { List<PartitionSpec> __this__success = new ArrayList<PartitionSpec>(other.success.size()); 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<PartitionSpec> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(PartitionSpec elem) { if (this.success == null) { this.success = new ArrayList<PartitionSpec>(); } this.success.add(elem); } public List<PartitionSpec> getSuccess() { return this.success; } public void setSuccess(List<PartitionSpec> 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<PartitionSpec>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_pspec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_pspec_result> { 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 _list944 = iprot.readListBegin(); struct.success = new ArrayList<PartitionSpec>(_list944.size); PartitionSpec _elem945; for (int _i946 = 0; _i946 < _list944.size; ++_i946) { _elem945 = new PartitionSpec(); _elem945.read(iprot); struct.success.add(_elem945); } 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 _iter947 : struct.success) { _iter947.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<get_partitions_pspec_result> { @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 _iter948 : struct.success) { _iter948.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 _list949 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<PartitionSpec>(_list949.size); PartitionSpec _elem950; for (int _i951 = 0; _i951 < _list949.size; ++_i951) { _elem950 = new PartitionSpec(); _elem950.read(iprot); struct.success.add(_elem950); } } 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<get_partition_names_args, get_partition_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_names_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partition_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partition_names_args> { 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<get_partition_names_args> { @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<get_partition_names_result, get_partition_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_names_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_resultTupleSchemeFactory()); } private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partition_names_result(get_partition_names_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partition_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partition_names_result> { 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 _list952 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list952.size); String _elem953; for (int _i954 = 0; _i954 < _list952.size; ++_i954) { _elem953 = iprot.readString(); struct.success.add(_elem953); } 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 _iter955 : struct.success) { oprot.writeString(_iter955); } 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<get_partition_names_result> { @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 _iter956 : struct.success) { oprot.writeString(_iter956); } } } 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 _list957 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list957.size); String _elem958; for (int _i959 = 0; _i959 < _list957.size; ++_i959) { _elem958 = iprot.readString(); struct.success.add(_elem958); } } 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<get_partitions_ps_args, get_partitions_ps_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_ps_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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 PART_VALS: return getPart_vals(); case MAX_PARTS: return 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partitions_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partitions_ps_args> { 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 _list960 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list960.size); String _elem961; for (int _i962 = 0; _i962 < _list960.size; ++_i962) { _elem961 = iprot.readString(); struct.part_vals.add(_elem961); } 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 _iter963 : struct.part_vals) { oprot.writeString(_iter963); } 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<get_partitions_ps_args> { @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 _iter964 : struct.part_vals) { oprot.writeString(_iter964); } } } 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 _list965 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list965.size); String _elem966; for (int _i967 = 0; _i967 < _list965.size; ++_i967) { _elem966 = iprot.readString(); struct.part_vals.add(_elem966); } } 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<get_partitions_ps_result, get_partitions_ps_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_ps_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_ps_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_ps_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_ps_result(get_partitions_ps_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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((List<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_ps_result> { 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 _list968 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list968.size); Partition _elem969; for (int _i970 = 0; _i970 < _list968.size; ++_i970) { _elem969 = new Partition(); _elem969.read(iprot); struct.success.add(_elem969); } 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 _iter971 : struct.success) { _iter971.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<get_partitions_ps_result> { @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 _iter972 : struct.success) { _iter972.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 _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list973.size); Partition _elem974; for (int _i975 = 0; _i975 < _list973.size; ++_i975) { _elem974 = new Partition(); _elem974.read(iprot); struct.success.add(_elem974); } } 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<get_partitions_ps_with_auth_args, get_partitions_ps_with_auth_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_ps_with_auth_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> part_vals; // required private short max_parts; // required private String user_name; // required private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> part_vals, short max_parts, String user_name, List<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> __this__group_names = new ArrayList<String>(other.group_names); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<String> 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<String>(); } this.group_names.add(elem); } public List<String> getGroup_names() { return this.group_names; } public void setGroup_names(List<String> 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<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<String>)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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); boolean present_user_name = true && (isSetUser_name()); list.add(present_user_name); if (present_user_name) list.add(user_name); boolean present_group_names = true && (isSetGroup_names()); list.add(present_group_names); if (present_group_names) list.add(group_names); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.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<get_partitions_ps_with_auth_args> { 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 _list976 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list976.size); String _elem977; for (int _i978 = 0; _i978 < _list976.size; ++_i978) { _elem977 = iprot.readString(); struct.part_vals.add(_elem977); } 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 _list979 = iprot.readListBegin(); struct.group_names = new ArrayList<String>(_list979.size); String _elem980; for (int _i981 = 0; _i981 < _list979.size; ++_i981) { _elem980 = iprot.readString(); struct.group_names.add(_elem980); } 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 _iter982 : struct.part_vals) { oprot.writeString(_iter982); } 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 _iter983 : struct.group_names) { oprot.writeString(_iter983); } 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<get_partitions_ps_with_auth_args> { @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 _iter984 : struct.part_vals) { oprot.writeString(_iter984); } } } 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 _iter985 : struct.group_names) { oprot.writeString(_iter985); } } } } @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 _list986 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list986.size); String _elem987; for (int _i988 = 0; _i988 < _list986.size; ++_i988) { _elem987 = iprot.readString(); struct.part_vals.add(_elem987); } } 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 _list989 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList<String>(_list989.size); String _elem990; for (int _i991 = 0; _i991 < _list989.size; ++_i991) { _elem990 = iprot.readString(); struct.group_names.add(_elem990); } } struct.setGroup_namesIsSet(true); } } } } public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase<get_partitions_ps_with_auth_result, get_partitions_ps_with_auth_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_ps_with_auth_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<Partition> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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 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<Partition>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_ps_with_auth_result> { 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 _list992 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list992.size); Partition _elem993; for (int _i994 = 0; _i994 < _list992.size; ++_i994) { _elem993 = new Partition(); _elem993.read(iprot); struct.success.add(_elem993); } 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 _iter995 : struct.success) { _iter995.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<get_partitions_ps_with_auth_result> { @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 _iter996 : struct.success) { _iter996.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 _list997 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list997.size); Partition _elem998; for (int _i999 = 0; _i999 < _list997.size; ++_i999) { _elem998 = new Partition(); _elem998.read(iprot); struct.success.add(_elem998); } } 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<get_partition_names_ps_args, get_partition_names_ps_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_names_ps_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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 PART_VALS: return getPart_vals(); case MAX_PARTS: return 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partition_names_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partition_names_ps_args> { 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 _list1000 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list1000.size); String _elem1001; for (int _i1002 = 0; _i1002 < _list1000.size; ++_i1002) { _elem1001 = iprot.readString(); struct.part_vals.add(_elem1001); } 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 _iter1003 : struct.part_vals) { oprot.writeString(_iter1003); } 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<get_partition_names_ps_args> { @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 _iter1004 : struct.part_vals) { oprot.writeString(_iter1004); } } } 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 _list1005 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list1005.size); String _elem1006; for (int _i1007 = 0; _i1007 < _list1005.size; ++_i1007) { _elem1006 = iprot.readString(); struct.part_vals.add(_elem1006); } } 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<get_partition_names_ps_result, get_partition_names_ps_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_names_ps_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partition_names_ps_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partition_names_ps_resultTupleSchemeFactory()); } private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partition_names_ps_result(get_partition_names_ps_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partition_names_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partition_names_ps_result> { 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 _list1008 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1008.size); String _elem1009; for (int _i1010 = 0; _i1010 < _list1008.size; ++_i1010) { _elem1009 = iprot.readString(); struct.success.add(_elem1009); } 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 _iter1011 : struct.success) { oprot.writeString(_iter1011); } 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<get_partition_names_ps_result> { @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 _iter1012 : struct.success) { oprot.writeString(_iter1012); } } } 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 _list1013 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1013.size); String _elem1014; for (int _i1015 = 0; _i1015 < _list1013.size; ++_i1015) { _elem1014 = iprot.readString(); struct.success.add(_elem1014); } } 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<get_partitions_by_filter_args, get_partitions_by_filter_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_filter_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_filter = true && (isSetFilter()); list.add(present_filter); if (present_filter) list.add(filter); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override public int compareTo(get_partitions_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_partitions_by_filter_args> { 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<get_partitions_by_filter_args> { @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<get_partitions_by_filter_result, get_partitions_by_filter_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_filter_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_filter_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_filter_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_by_filter_result(get_partitions_by_filter_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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((List<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_by_filter_result> { 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 _list1016 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list1016.size); Partition _elem1017; for (int _i1018 = 0; _i1018 < _list1016.size; ++_i1018) { _elem1017 = new Partition(); _elem1017.read(iprot); struct.success.add(_elem1017); } 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 _iter1019 : struct.success) { _iter1019.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<get_partitions_by_filter_result> { @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 _iter1020 : struct.success) { _iter1020.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 _list1021 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list1021.size); Partition _elem1022; for (int _i1023 = 0; _i1023 < _list1021.size; ++_i1023) { _elem1022 = new Partition(); _elem1022.read(iprot); struct.success.add(_elem1022); } } 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<get_part_specs_by_filter_args, get_part_specs_by_filter_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_part_specs_by_filter_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_filter = true && (isSetFilter()); list.add(present_filter); if (present_filter) list.add(filter); boolean present_max_parts = true; list.add(present_max_parts); if (present_max_parts) list.add(max_parts); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.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<get_part_specs_by_filter_args> { 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<get_part_specs_by_filter_args> { @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<get_part_specs_by_filter_result, get_part_specs_by_filter_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_part_specs_by_filter_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<PartitionSpec> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<PartitionSpec> success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_part_specs_by_filter_result(get_part_specs_by_filter_result other) { if (other.isSetSuccess()) { List<PartitionSpec> __this__success = new ArrayList<PartitionSpec>(other.success.size()); 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<PartitionSpec> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(PartitionSpec elem) { if (this.success == null) { this.success = new ArrayList<PartitionSpec>(); } this.success.add(elem); } public List<PartitionSpec> getSuccess() { return this.success; } public void setSuccess(List<PartitionSpec> 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<PartitionSpec>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_part_specs_by_filter_result> { 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 _list1024 = iprot.readListBegin(); struct.success = new ArrayList<PartitionSpec>(_list1024.size); PartitionSpec _elem1025; for (int _i1026 = 0; _i1026 < _list1024.size; ++_i1026) { _elem1025 = new PartitionSpec(); _elem1025.read(iprot); struct.success.add(_elem1025); } 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 _iter1027 : struct.success) { _iter1027.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<get_part_specs_by_filter_result> { @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 _iter1028 : struct.success) { _iter1028.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 _list1029 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<PartitionSpec>(_list1029.size); PartitionSpec _elem1030; for (int _i1031 = 0; _i1031 < _list1029.size; ++_i1031) { _elem1030 = new PartitionSpec(); _elem1030.read(iprot); struct.success.add(_elem1030); } } 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<get_partitions_by_expr_args, get_partitions_by_expr_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_expr_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(get_partitions_by_expr_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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<get_partitions_by_expr_args> { 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<get_partitions_by_expr_args> { @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<get_partitions_by_expr_result, get_partitions_by_expr_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_expr_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_by_expr_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_by_expr_result> { 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<get_partitions_by_expr_result> { @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_num_partitions_by_filter_args implements org.apache.thrift.TBase<get_num_partitions_by_filter_args, get_num_partitions_by_filter_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_num_partitions_by_filter_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_num_partitions_by_filter_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_num_partitions_by_filter_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private String filter; // required /** 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"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // FILTER return FILTER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_args.class, metaDataMap); } public get_num_partitions_by_filter_args() { } public get_num_partitions_by_filter_args( String db_name, String tbl_name, String filter) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.filter = filter; } /** * Performs a deep copy on <i>other</i>. */ public get_num_partitions_by_filter_args(get_num_partitions_by_filter_args other) { 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; } } public get_num_partitions_by_filter_args deepCopy() { return new get_num_partitions_by_filter_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.filter = 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 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 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; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case FILTER: return getFilter(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_num_partitions_by_filter_args) return this.equals((get_num_partitions_by_filter_args)that); return false; } public boolean equals(get_num_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_filter = true && (isSetFilter()); list.add(present_filter); if (present_filter) list.add(filter); return list.hashCode(); } @Override public int compareTo(get_num_partitions_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_num_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; 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_num_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { public get_num_partitions_by_filter_argsStandardScheme getScheme() { return new get_num_partitions_by_filter_argsStandardScheme(); } } private static class get_num_partitions_by_filter_argsStandardScheme extends StandardScheme<get_num_partitions_by_filter_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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; 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_num_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.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_num_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { public get_num_partitions_by_filter_argsTupleScheme getScheme() { return new get_num_partitions_by_filter_argsTupleScheme(); } } private static class get_num_partitions_by_filter_argsTupleScheme extends TupleScheme<get_num_partitions_by_filter_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); } oprot.writeBitSet(optionals, 3); 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); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_num_partitions_by_filter_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.filter = iprot.readString(); struct.setFilterIsSet(true); } } } } public static class get_num_partitions_by_filter_result implements org.apache.thrift.TBase<get_num_partitions_by_filter_result, get_num_partitions_by_filter_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_num_partitions_by_filter_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_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.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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_num_partitions_by_filter_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_num_partitions_by_filter_resultTupleSchemeFactory()); } private int 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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.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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_result.class, metaDataMap); } public get_num_partitions_by_filter_result() { } public get_num_partitions_by_filter_result( int success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_num_partitions_by_filter_result(get_num_partitions_by_filter_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 get_num_partitions_by_filter_result deepCopy() { return new get_num_partitions_by_filter_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.o1 = null; this.o2 = 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 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((Integer)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_num_partitions_by_filter_result) return this.equals((get_num_partitions_by_filter_result)that); return false; } public boolean equals(get_num_partitions_by_filter_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_num_partitions_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_num_partitions_by_filter_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 get_num_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { public get_num_partitions_by_filter_resultStandardScheme getScheme() { return new get_num_partitions_by_filter_resultStandardScheme(); } } private static class get_num_partitions_by_filter_resultStandardScheme extends StandardScheme<get_num_partitions_by_filter_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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.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 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_num_partitions_by_filter_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(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_num_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { public get_num_partitions_by_filter_resultTupleScheme getScheme() { return new get_num_partitions_by_filter_resultTupleScheme(); } } private static class get_num_partitions_by_filter_resultTupleScheme extends TupleScheme<get_num_partitions_by_filter_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); } 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_num_partitions_by_filter_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readI32(); 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<get_partitions_by_names_args, get_partitions_by_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_names_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> names) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.names = names; } /** * Performs a deep copy on <i>other</i>. */ 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<String> __this__names = new ArrayList<String>(other.names); 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<String> getNamesIterator() { return (this.names == null) ? null : this.names.iterator(); } public void addToNames(String elem) { if (this.names == null) { this.names = new ArrayList<String>(); } this.names.add(elem); } public List<String> getNames() { return this.names; } public void setNames(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_names = true && (isSetNames()); list.add(present_names); if (present_names) list.add(names); return list.hashCode(); } @Override public int compareTo(get_partitions_by_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNames()).compareTo(other.isSetNames()); if (lastComparison != 0) { return lastComparison; } if (isSetNames()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.names, other.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<get_partitions_by_names_args> { 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 _list1032 = iprot.readListBegin(); struct.names = new ArrayList<String>(_list1032.size); String _elem1033; for (int _i1034 = 0; _i1034 < _list1032.size; ++_i1034) { _elem1033 = iprot.readString(); struct.names.add(_elem1033); } 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 _iter1035 : struct.names) { oprot.writeString(_iter1035); } 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<get_partitions_by_names_args> { @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 _iter1036 : struct.names) { oprot.writeString(_iter1036); } } } } @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 _list1037 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.names = new ArrayList<String>(_list1037.size); String _elem1038; for (int _i1039 = 0; _i1039 < _list1037.size; ++_i1039) { _elem1038 = iprot.readString(); struct.names.add(_elem1038); } } struct.setNamesIsSet(true); } } } } public static class get_partitions_by_names_result implements org.apache.thrift.TBase<get_partitions_by_names_result, get_partitions_by_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_by_names_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_partitions_by_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_partitions_by_names_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Partition> success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_partitions_by_names_result(get_partitions_by_names_result other) { if (other.isSetSuccess()) { List<Partition> __this__success = new ArrayList<Partition>(other.success.size()); 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<Partition> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Partition elem) { if (this.success == null) { this.success = new ArrayList<Partition>(); } this.success.add(elem); } public List<Partition> getSuccess() { return this.success; } public void setSuccess(List<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((List<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_by_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_by_names_result> { 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 _list1040 = iprot.readListBegin(); struct.success = new ArrayList<Partition>(_list1040.size); Partition _elem1041; for (int _i1042 = 0; _i1042 < _list1040.size; ++_i1042) { _elem1041 = new Partition(); _elem1041.read(iprot); struct.success.add(_elem1041); } 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 _iter1043 : struct.success) { _iter1043.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<get_partitions_by_names_result> { @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 _iter1044 : struct.success) { _iter1044.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 _list1045 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Partition>(_list1045.size); Partition _elem1046; for (int _i1047 = 0; _i1047 < _list1045.size; ++_i1047) { _elem1046 = new Partition(); _elem1046.read(iprot); struct.success.add(_elem1046); } } 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<alter_partition_args, alter_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_part = true && (isSetNew_part()); list.add(present_new_part); if (present_new_part) list.add(new_part); return list.hashCode(); } @Override public int compareTo(alter_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.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<alter_partition_args> { 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<alter_partition_args> { @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<alter_partition_result, alter_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_partition_result> { 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<alter_partition_result> { @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<alter_partitions_args, alter_partitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partitions_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<Partition> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<Partition> new_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.new_parts = new_parts; } /** * Performs a deep copy on <i>other</i>. */ 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<Partition> __this__new_parts = new ArrayList<Partition>(other.new_parts.size()); 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<Partition> 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<Partition>(); } this.new_parts.add(elem); } public List<Partition> getNew_parts() { return this.new_parts; } public void setNew_parts(List<Partition> 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<Partition>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_parts = true && (isSetNew_parts()); list.add(present_new_parts); if (present_new_parts) list.add(new_parts); return list.hashCode(); } @Override public int compareTo(alter_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.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<alter_partitions_args> { 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 _list1048 = iprot.readListBegin(); struct.new_parts = new ArrayList<Partition>(_list1048.size); Partition _elem1049; for (int _i1050 = 0; _i1050 < _list1048.size; ++_i1050) { _elem1049 = new Partition(); _elem1049.read(iprot); struct.new_parts.add(_elem1049); } 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 _iter1051 : struct.new_parts) { _iter1051.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<alter_partitions_args> { @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 _iter1052 : struct.new_parts) { _iter1052.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 _list1053 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList<Partition>(_list1053.size); Partition _elem1054; for (int _i1055 = 0; _i1055 < _list1053.size; ++_i1055) { _elem1054 = new Partition(); _elem1054.read(iprot); struct.new_parts.add(_elem1054); } } struct.setNew_partsIsSet(true); } } } } public static class alter_partitions_result implements org.apache.thrift.TBase<alter_partitions_result, alter_partitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partitions_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_partitions_result> { 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<alter_partitions_result> { @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_partitions_with_environment_context_args implements org.apache.thrift.TBase<alter_partitions_with_environment_context_args, alter_partitions_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partitions_with_environment_context_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_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_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partitions_with_environment_context_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partitions_with_environment_context_argsTupleSchemeFactory()); } private String db_name; // required private String tbl_name; // required private List<Partition> new_parts; // 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_PARTS((short)3, "new_parts"), ENVIRONMENT_CONTEXT((short)4, "environment_context"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DB_NAME return DB_NAME; case 2: // TBL_NAME return TBL_NAME; case 3: // NEW_PARTS return NEW_PARTS; 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_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)))); 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_partitions_with_environment_context_args.class, metaDataMap); } public alter_partitions_with_environment_context_args() { } public alter_partitions_with_environment_context_args( String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context) { this(); this.db_name = db_name; this.tbl_name = tbl_name; this.new_parts = new_parts; this.environment_context = environment_context; } /** * Performs a deep copy on <i>other</i>. */ public alter_partitions_with_environment_context_args(alter_partitions_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_parts()) { List<Partition> __this__new_parts = new ArrayList<Partition>(other.new_parts.size()); for (Partition other_element : other.new_parts) { __this__new_parts.add(new Partition(other_element)); } this.new_parts = __this__new_parts; } if (other.isSetEnvironment_context()) { this.environment_context = new EnvironmentContext(other.environment_context); } } public alter_partitions_with_environment_context_args deepCopy() { return new alter_partitions_with_environment_context_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.new_parts = 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 getNew_partsSize() { return (this.new_parts == null) ? 0 : this.new_parts.size(); } public java.util.Iterator<Partition> 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<Partition>(); } this.new_parts.add(elem); } public List<Partition> getNew_parts() { return this.new_parts; } public void setNew_parts(List<Partition> 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 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_PARTS: if (value == null) { unsetNew_parts(); } else { setNew_parts((List<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_PARTS: return getNew_parts(); 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_PARTS: return isSetNew_parts(); case ENVIRONMENT_CONTEXT: return isSetEnvironment_context(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof alter_partitions_with_environment_context_args) return this.equals((alter_partitions_with_environment_context_args)that); return false; } public boolean equals(alter_partitions_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_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; } 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_parts = true && (isSetNew_parts()); list.add(present_new_parts); if (present_new_parts) list.add(new_parts); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override public int compareTo(alter_partitions_with_environment_context_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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_partitions_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_parts:"); if (this.new_parts == null) { sb.append("null"); } else { sb.append(this.new_parts); } 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 alter_partitions_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { public alter_partitions_with_environment_context_argsStandardScheme getScheme() { return new alter_partitions_with_environment_context_argsStandardScheme(); } } private static class alter_partitions_with_environment_context_argsStandardScheme extends StandardScheme<alter_partitions_with_environment_context_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_PARTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list1056 = iprot.readListBegin(); struct.new_parts = new ArrayList<Partition>(_list1056.size); Partition _elem1057; for (int _i1058 = 0; _i1058 < _list1056.size; ++_i1058) { _elem1057 = new Partition(); _elem1057.read(iprot); struct.new_parts.add(_elem1057); } iprot.readListEnd(); } struct.setNew_partsIsSet(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_partitions_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_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 _iter1059 : struct.new_parts) { _iter1059.write(oprot); } 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 alter_partitions_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { public alter_partitions_with_environment_context_argsTupleScheme getScheme() { return new alter_partitions_with_environment_context_argsTupleScheme(); } } private static class alter_partitions_with_environment_context_argsTupleScheme extends TupleScheme<alter_partitions_with_environment_context_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_parts()) { 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_parts()) { { oprot.writeI32(struct.new_parts.size()); for (Partition _iter1060 : struct.new_parts) { _iter1060.write(oprot); } } } if (struct.isSetEnvironment_context()) { struct.environment_context.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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 _list1061 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.new_parts = new ArrayList<Partition>(_list1061.size); Partition _elem1062; for (int _i1063 = 0; _i1063 < _list1061.size; ++_i1063) { _elem1062 = new Partition(); _elem1062.read(iprot); struct.new_parts.add(_elem1062); } } struct.setNew_partsIsSet(true); } if (incoming.get(3)) { struct.environment_context = new EnvironmentContext(); struct.environment_context.read(iprot); struct.setEnvironment_contextIsSet(true); } } } } public static class alter_partitions_with_environment_context_result implements org.apache.thrift.TBase<alter_partitions_with_environment_context_result, alter_partitions_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partitions_with_environment_context_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new alter_partitions_with_environment_context_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new alter_partitions_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_with_environment_context_result.class, metaDataMap); } public alter_partitions_with_environment_context_result() { } public alter_partitions_with_environment_context_result( InvalidOperationException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public alter_partitions_with_environment_context_result(alter_partitions_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_partitions_with_environment_context_result deepCopy() { return new alter_partitions_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_partitions_with_environment_context_result) return this.equals((alter_partitions_with_environment_context_result)that); return false; } public boolean equals(alter_partitions_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_partitions_with_environment_context_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_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_partitions_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { public alter_partitions_with_environment_context_resultStandardScheme getScheme() { return new alter_partitions_with_environment_context_resultStandardScheme(); } } private static class alter_partitions_with_environment_context_resultStandardScheme extends StandardScheme<alter_partitions_with_environment_context_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_partitions_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_partitions_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { public alter_partitions_with_environment_context_resultTupleScheme getScheme() { return new alter_partitions_with_environment_context_resultTupleScheme(); } } private static class alter_partitions_with_environment_context_resultTupleScheme extends TupleScheme<alter_partitions_with_environment_context_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_partitions_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_partition_with_environment_context_args implements org.apache.thrift.TBase<alter_partition_with_environment_context_args, alter_partition_with_environment_context_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partition_with_environment_context_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_new_part = true && (isSetNew_part()); list.add(present_new_part); if (present_new_part) list.add(new_part); boolean present_environment_context = true && (isSetEnvironment_context()); list.add(present_environment_context); if (present_environment_context) list.add(environment_context); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); if (lastComparison != 0) { return lastComparison; } if (isSetEnvironment_context()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.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<alter_partition_with_environment_context_args> { 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<alter_partition_with_environment_context_args> { @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<alter_partition_with_environment_context_result, alter_partition_with_environment_context_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_partition_with_environment_context_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_partition_with_environment_context_result> { 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<alter_partition_with_environment_context_result> { @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<rename_partition_args, rename_partition_args._Fields>, java.io.Serializable, Cloneable, Comparable<rename_partition_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> 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 <i>other</i>. */ 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<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_new_part = true && (isSetNew_part()); list.add(present_new_part); if (present_new_part) list.add(new_part); return list.hashCode(); } @Override public int compareTo(rename_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.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<rename_partition_args> { 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 _list1064 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list1064.size); String _elem1065; for (int _i1066 = 0; _i1066 < _list1064.size; ++_i1066) { _elem1065 = iprot.readString(); struct.part_vals.add(_elem1065); } 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 _iter1067 : struct.part_vals) { oprot.writeString(_iter1067); } 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<rename_partition_args> { @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 _iter1068 : struct.part_vals) { oprot.writeString(_iter1068); } } } 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 _list1069 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list1069.size); String _elem1070; for (int _i1071 = 0; _i1071 < _list1069.size; ++_i1071) { _elem1070 = iprot.readString(); struct.part_vals.add(_elem1070); } } 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<rename_partition_result, rename_partition_result._Fields>, java.io.Serializable, Cloneable, Comparable<rename_partition_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(rename_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<rename_partition_result> { 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<rename_partition_result> { @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<partition_name_has_valid_characters_args, partition_name_has_valid_characters_args._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_has_valid_characters_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> part_vals, boolean throw_exception) { this(); this.part_vals = part_vals; this.throw_exception = throw_exception; setThrow_exceptionIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public partition_name_has_valid_characters_args(partition_name_has_valid_characters_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPart_vals()) { List<String> __this__part_vals = new ArrayList<String>(other.part_vals); 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<String> 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<String>(); } this.part_vals.add(elem); } public List<String> getPart_vals() { return this.part_vals; } public void setPart_vals(List<String> 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<String>)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 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() { List<Object> list = new ArrayList<Object>(); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_throw_exception = true; list.add(present_throw_exception); if (present_throw_exception) list.add(throw_exception); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetThrow_exception()).compareTo(other.isSetThrow_exception()); if (lastComparison != 0) { return lastComparison; } if (isSetThrow_exception()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.throw_exception, other.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<partition_name_has_valid_characters_args> { 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 _list1072 = iprot.readListBegin(); struct.part_vals = new ArrayList<String>(_list1072.size); String _elem1073; for (int _i1074 = 0; _i1074 < _list1072.size; ++_i1074) { _elem1073 = iprot.readString(); struct.part_vals.add(_elem1073); } 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 _iter1075 : struct.part_vals) { oprot.writeString(_iter1075); } 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<partition_name_has_valid_characters_args> { @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 _iter1076 : struct.part_vals) { oprot.writeString(_iter1076); } } } 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 _list1077 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.part_vals = new ArrayList<String>(_list1077.size); String _elem1078; for (int _i1079 = 0; _i1079 < _list1077.size; ++_i1079) { _elem1078 = iprot.readString(); struct.part_vals.add(_elem1078); } } 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<partition_name_has_valid_characters_result, partition_name_has_valid_characters_result._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_has_valid_characters_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<partition_name_has_valid_characters_result> { 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<partition_name_has_valid_characters_result> { @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<get_config_value_args, get_config_value_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_config_value_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME return NAME; case 2: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_defaultValue = true && (isSetDefaultValue()); list.add(present_defaultValue); if (present_defaultValue) list.add(defaultValue); return list.hashCode(); } @Override public int compareTo(get_config_value_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(other.isSetDefaultValue()); if (lastComparison != 0) { return lastComparison; } if (isSetDefaultValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, other.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<get_config_value_args> { 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<get_config_value_args> { @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<get_config_value_result, get_config_value_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_config_value_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_config_value_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_config_value_result> { 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<get_config_value_result> { @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<partition_name_to_vals_args, partition_name_to_vals_args._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_to_vals_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); return list.hashCode(); } @Override public int compareTo(partition_name_to_vals_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.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<partition_name_to_vals_args> { 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<partition_name_to_vals_args> { @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<partition_name_to_vals_result, partition_name_to_vals_result._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_to_vals_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_vals_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_vals_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public partition_name_to_vals_result(partition_name_to_vals_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(partition_name_to_vals_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<partition_name_to_vals_result> { 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 _list1080 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1080.size); String _elem1081; for (int _i1082 = 0; _i1082 < _list1080.size; ++_i1082) { _elem1081 = iprot.readString(); struct.success.add(_elem1081); } 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 _iter1083 : struct.success) { oprot.writeString(_iter1083); } 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<partition_name_to_vals_result> { @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 _iter1084 : struct.success) { oprot.writeString(_iter1084); } } } 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 _list1085 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1085.size); String _elem1086; for (int _i1087 = 0; _i1087 < _list1085.size; ++_i1087) { _elem1086 = iprot.readString(); struct.success.add(_elem1086); } } 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<partition_name_to_spec_args, partition_name_to_spec_args._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_to_spec_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); return list.hashCode(); } @Override public int compareTo(partition_name_to_spec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.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<partition_name_to_spec_args> { 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<partition_name_to_spec_args> { @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<partition_name_to_spec_result, partition_name_to_spec_result._Fields>, java.io.Serializable, Cloneable, Comparable<partition_name_to_spec_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new partition_name_to_spec_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new partition_name_to_spec_resultTupleSchemeFactory()); } private Map<String,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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String,String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public partition_name_to_spec_result(partition_name_to_spec_result other) { if (other.isSetSuccess()) { Map<String,String> __this__success = new HashMap<String,String>(other.success); 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<String,String>(); } this.success.put(key, val); } public Map<String,String> getSuccess() { return this.success; } public void setSuccess(Map<String,String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<String,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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(partition_name_to_spec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<partition_name_to_spec_result> { 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 _map1088 = iprot.readMapBegin(); struct.success = new HashMap<String,String>(2*_map1088.size); String _key1089; String _val1090; for (int _i1091 = 0; _i1091 < _map1088.size; ++_i1091) { _key1089 = iprot.readString(); _val1090 = iprot.readString(); struct.success.put(_key1089, _val1090); } 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<String, String> _iter1092 : struct.success.entrySet()) { oprot.writeString(_iter1092.getKey()); oprot.writeString(_iter1092.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<partition_name_to_spec_result> { @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<String, String> _iter1093 : struct.success.entrySet()) { oprot.writeString(_iter1093.getKey()); oprot.writeString(_iter1093.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 _map1094 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new HashMap<String,String>(2*_map1094.size); String _key1095; String _val1096; for (int _i1097 = 0; _i1097 < _map1094.size; ++_i1097) { _key1095 = iprot.readString(); _val1096 = iprot.readString(); struct.success.put(_key1095, _val1096); } } 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<markPartitionForEvent_args, markPartitionForEvent_args._Fields>, java.io.Serializable, Cloneable, Comparable<markPartitionForEvent_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String,String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String,String> 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 <i>other</i>. */ 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<String,String> __this__part_vals = new HashMap<String,String>(other.part_vals); 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<String,String>(); } this.part_vals.put(key, val); } public Map<String,String> getPart_vals() { return this.part_vals; } public void setPart_vals(Map<String,String> 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<String,String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_eventType = true && (isSetEventType()); list.add(present_eventType); if (present_eventType) list.add(eventType.getValue()); return list.hashCode(); } @Override public int compareTo(markPartitionForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.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<markPartitionForEvent_args> { 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 _map1098 = iprot.readMapBegin(); struct.part_vals = new HashMap<String,String>(2*_map1098.size); String _key1099; String _val1100; for (int _i1101 = 0; _i1101 < _map1098.size; ++_i1101) { _key1099 = iprot.readString(); _val1100 = iprot.readString(); struct.part_vals.put(_key1099, _val1100); } 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 = org.apache.hadoop.hive.metastore.api.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<String, String> _iter1102 : struct.part_vals.entrySet()) { oprot.writeString(_iter1102.getKey()); oprot.writeString(_iter1102.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<markPartitionForEvent_args> { @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<String, String> _iter1103 : struct.part_vals.entrySet()) { oprot.writeString(_iter1103.getKey()); oprot.writeString(_iter1103.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 _map1104 = 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<String,String>(2*_map1104.size); String _key1105; String _val1106; for (int _i1107 = 0; _i1107 < _map1104.size; ++_i1107) { _key1105 = iprot.readString(); _val1106 = iprot.readString(); struct.part_vals.put(_key1105, _val1106); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } } } } public static class markPartitionForEvent_result implements org.apache.thrift.TBase<markPartitionForEvent_result, markPartitionForEvent_result._Fields>, java.io.Serializable, Cloneable, Comparable<markPartitionForEvent_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); boolean present_o5 = true && (isSetO5()); list.add(present_o5); if (present_o5) list.add(o5); boolean present_o6 = true && (isSetO6()); list.add(present_o6); if (present_o6) list.add(o6); return list.hashCode(); } @Override public int compareTo(markPartitionForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.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<markPartitionForEvent_result> { 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<markPartitionForEvent_result> { @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<isPartitionMarkedForEvent_args, isPartitionMarkedForEvent_args._Fields>, java.io.Serializable, Cloneable, Comparable<isPartitionMarkedForEvent_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String,String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String,String> 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 <i>other</i>. */ 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<String,String> __this__part_vals = new HashMap<String,String>(other.part_vals); 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<String,String>(); } this.part_vals.put(key, val); } public Map<String,String> getPart_vals() { return this.part_vals; } public void setPart_vals(Map<String,String> 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<String,String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_vals = true && (isSetPart_vals()); list.add(present_part_vals); if (present_part_vals) list.add(part_vals); boolean present_eventType = true && (isSetEventType()); list.add(present_eventType); if (present_eventType) list.add(eventType.getValue()); return list.hashCode(); } @Override public int compareTo(isPartitionMarkedForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.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<isPartitionMarkedForEvent_args> { 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 _map1108 = iprot.readMapBegin(); struct.part_vals = new HashMap<String,String>(2*_map1108.size); String _key1109; String _val1110; for (int _i1111 = 0; _i1111 < _map1108.size; ++_i1111) { _key1109 = iprot.readString(); _val1110 = iprot.readString(); struct.part_vals.put(_key1109, _val1110); } 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 = org.apache.hadoop.hive.metastore.api.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<String, String> _iter1112 : struct.part_vals.entrySet()) { oprot.writeString(_iter1112.getKey()); oprot.writeString(_iter1112.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<isPartitionMarkedForEvent_args> { @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<String, String> _iter1113 : struct.part_vals.entrySet()) { oprot.writeString(_iter1113.getKey()); oprot.writeString(_iter1113.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 _map1114 = 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<String,String>(2*_map1114.size); String _key1115; String _val1116; for (int _i1117 = 0; _i1117 < _map1114.size; ++_i1117) { _key1115 = iprot.readString(); _val1116 = iprot.readString(); struct.part_vals.put(_key1115, _val1116); } } struct.setPart_valsIsSet(true); } if (incoming.get(3)) { struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); struct.setEventTypeIsSet(true); } } } } public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase<isPartitionMarkedForEvent_result, isPartitionMarkedForEvent_result._Fields>, java.io.Serializable, Cloneable, Comparable<isPartitionMarkedForEvent_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); boolean present_o5 = true && (isSetO5()); list.add(present_o5); if (present_o5) list.add(o5); boolean present_o6 = true && (isSetO6()); list.add(present_o6); if (present_o6) list.add(o6); return list.hashCode(); } @Override public int compareTo(isPartitionMarkedForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.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<isPartitionMarkedForEvent_result> { 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<isPartitionMarkedForEvent_result> { @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<add_index_args, add_index_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_index_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_new_index = true && (isSetNew_index()); list.add(present_new_index); if (present_new_index) list.add(new_index); boolean present_index_table = true && (isSetIndex_table()); list.add(present_index_table); if (present_index_table) list.add(index_table); return list.hashCode(); } @Override public int compareTo(add_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(other.isSetNew_index()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_index()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_index, other.new_index); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(other.isSetIndex_table()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_table()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_table, other.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<add_index_args> { 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<add_index_args> { @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<add_index_result, add_index_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_index_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(add_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<add_index_result> { 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<add_index_result> { @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<alter_index_args, alter_index_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_index_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbname = true && (isSetDbname()); list.add(present_dbname); if (present_dbname) list.add(dbname); boolean present_base_tbl_name = true && (isSetBase_tbl_name()); list.add(present_base_tbl_name); if (present_base_tbl_name) list.add(base_tbl_name); boolean present_idx_name = true && (isSetIdx_name()); list.add(present_idx_name); if (present_idx_name) list.add(idx_name); boolean present_new_idx = true && (isSetNew_idx()); list.add(present_new_idx); if (present_new_idx) list.add(new_idx); return list.hashCode(); } @Override public int compareTo(alter_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(other.isSetBase_tbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetBase_tbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tbl_name, other.base_tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(other.isSetIdx_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIdx_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idx_name, other.idx_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(other.isSetNew_idx()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_idx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_idx, other.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<alter_index_args> { 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<alter_index_args> { @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<alter_index_result, alter_index_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_index_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_index_result> { 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<alter_index_result> { @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<drop_index_by_name_args, drop_index_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_index_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_index_name = true && (isSetIndex_name()); list.add(present_index_name); if (present_index_name) list.add(index_name); boolean present_deleteData = true; list.add(present_deleteData); if (present_deleteData) list.add(deleteData); return list.hashCode(); } @Override public int compareTo(drop_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.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<drop_index_by_name_args> { 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<drop_index_by_name_args> { @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<drop_index_by_name_result, drop_index_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_index_by_name_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(drop_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<drop_index_by_name_result> { 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<drop_index_by_name_result> { @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<get_index_by_name_args, get_index_by_name_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_index_by_name_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_index_name = true && (isSetIndex_name()); list.add(present_index_name); if (present_index_name) list.add(index_name); return list.hashCode(); } @Override public int compareTo(get_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.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<get_index_by_name_args> { 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<get_index_by_name_args> { @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<get_index_by_name_result, get_index_by_name_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_index_by_name_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_index_by_name_result> { 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<get_index_by_name_result> { @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<get_indexes_args, get_indexes_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_indexes_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_indexes = true; list.add(present_max_indexes); if (present_max_indexes) list.add(max_indexes); return list.hashCode(); } @Override public int compareTo(get_indexes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.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<get_indexes_args> { 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<get_indexes_args> { @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<get_indexes_result, get_indexes_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_indexes_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_indexes_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_indexes_resultTupleSchemeFactory()); } private List<Index> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Index> success, NoSuchObjectException o1, MetaException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_indexes_result(get_indexes_result other) { if (other.isSetSuccess()) { List<Index> __this__success = new ArrayList<Index>(other.success.size()); 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<Index> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Index elem) { if (this.success == null) { this.success = new ArrayList<Index>(); } this.success.add(elem); } public List<Index> getSuccess() { return this.success; } public void setSuccess(List<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 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<Index>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_indexes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_indexes_result> { 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 _list1118 = iprot.readListBegin(); struct.success = new ArrayList<Index>(_list1118.size); Index _elem1119; for (int _i1120 = 0; _i1120 < _list1118.size; ++_i1120) { _elem1119 = new Index(); _elem1119.read(iprot); struct.success.add(_elem1119); } 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 _iter1121 : struct.success) { _iter1121.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<get_indexes_result> { @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 _iter1122 : struct.success) { _iter1122.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 _list1123 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Index>(_list1123.size); Index _elem1124; for (int _i1125 = 0; _i1125 < _list1123.size; ++_i1125) { _elem1124 = new Index(); _elem1124.read(iprot); struct.success.add(_elem1124); } } 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<get_index_names_args, get_index_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_index_names_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_max_indexes = true; list.add(present_max_indexes); if (present_max_indexes) list.add(max_indexes); return list.hashCode(); } @Override public int compareTo(get_index_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.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<get_index_names_args> { 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<get_index_names_args> { @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<get_index_names_result, get_index_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_index_names_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_index_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_index_names_resultTupleSchemeFactory()); } private List<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o2) { this(); this.success = success; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_index_names_result(get_index_names_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_index_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_index_names_result> { 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 _list1126 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1126.size); String _elem1127; for (int _i1128 = 0; _i1128 < _list1126.size; ++_i1128) { _elem1127 = iprot.readString(); struct.success.add(_elem1127); } 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 _iter1129 : struct.success) { oprot.writeString(_iter1129); } 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<get_index_names_result> { @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 _iter1130 : struct.success) { oprot.writeString(_iter1130); } } } 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 _list1131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1131.size); String _elem1132; for (int _i1133 = 0; _i1133 < _list1131.size; ++_i1133) { _elem1132 = iprot.readString(); struct.success.add(_elem1132); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class get_primary_keys_args implements org.apache.thrift.TBase<get_primary_keys_args, get_primary_keys_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_primary_keys_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_primary_keys_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_primary_keys_argsTupleSchemeFactory()); } private PrimaryKeysRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, PrimaryKeysRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_primary_keys_args.class, metaDataMap); } public get_primary_keys_args() { } public get_primary_keys_args( PrimaryKeysRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public get_primary_keys_args(get_primary_keys_args other) { if (other.isSetRequest()) { this.request = new PrimaryKeysRequest(other.request); } } public get_primary_keys_args deepCopy() { return new get_primary_keys_args(this); } @Override public void clear() { this.request = null; } public PrimaryKeysRequest getRequest() { return this.request; } public void setRequest(PrimaryKeysRequest 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((PrimaryKeysRequest)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_primary_keys_args) return this.equals((get_primary_keys_args)that); return false; } public boolean equals(get_primary_keys_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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_primary_keys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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_primary_keys_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_primary_keys_argsStandardSchemeFactory implements SchemeFactory { public get_primary_keys_argsStandardScheme getScheme() { return new get_primary_keys_argsStandardScheme(); } } private static class get_primary_keys_argsStandardScheme extends StandardScheme<get_primary_keys_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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 PrimaryKeysRequest(); 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_primary_keys_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_primary_keys_argsTupleSchemeFactory implements SchemeFactory { public get_primary_keys_argsTupleScheme getScheme() { return new get_primary_keys_argsTupleScheme(); } } private static class get_primary_keys_argsTupleScheme extends TupleScheme<get_primary_keys_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_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_primary_keys_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new PrimaryKeysRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_primary_keys_result implements org.apache.thrift.TBase<get_primary_keys_result, get_primary_keys_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_primary_keys_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_primary_keys_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_primary_keys_resultTupleSchemeFactory()); } private PrimaryKeysResponse 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, PrimaryKeysResponse.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_primary_keys_result.class, metaDataMap); } public get_primary_keys_result() { } public get_primary_keys_result( PrimaryKeysResponse success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_primary_keys_result(get_primary_keys_result other) { if (other.isSetSuccess()) { this.success = new PrimaryKeysResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_primary_keys_result deepCopy() { return new get_primary_keys_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public PrimaryKeysResponse getSuccess() { return this.success; } public void setSuccess(PrimaryKeysResponse 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((PrimaryKeysResponse)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_primary_keys_result) return this.equals((get_primary_keys_result)that); return false; } public boolean equals(get_primary_keys_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_primary_keys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_primary_keys_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_primary_keys_resultStandardSchemeFactory implements SchemeFactory { public get_primary_keys_resultStandardScheme getScheme() { return new get_primary_keys_resultStandardScheme(); } } private static class get_primary_keys_resultStandardScheme extends StandardScheme<get_primary_keys_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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 PrimaryKeysResponse(); 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_primary_keys_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_primary_keys_resultTupleSchemeFactory implements SchemeFactory { public get_primary_keys_resultTupleScheme getScheme() { return new get_primary_keys_resultTupleScheme(); } } private static class get_primary_keys_resultTupleScheme extends TupleScheme<get_primary_keys_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_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_primary_keys_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new PrimaryKeysResponse(); 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_foreign_keys_args implements org.apache.thrift.TBase<get_foreign_keys_args, get_foreign_keys_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_foreign_keys_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_foreign_keys_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_foreign_keys_argsTupleSchemeFactory()); } private ForeignKeysRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, ForeignKeysRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_foreign_keys_args.class, metaDataMap); } public get_foreign_keys_args() { } public get_foreign_keys_args( ForeignKeysRequest request) { this(); this.request = request; } /** * Performs a deep copy on <i>other</i>. */ public get_foreign_keys_args(get_foreign_keys_args other) { if (other.isSetRequest()) { this.request = new ForeignKeysRequest(other.request); } } public get_foreign_keys_args deepCopy() { return new get_foreign_keys_args(this); } @Override public void clear() { this.request = null; } public ForeignKeysRequest getRequest() { return this.request; } public void setRequest(ForeignKeysRequest 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((ForeignKeysRequest)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_foreign_keys_args) return this.equals((get_foreign_keys_args)that); return false; } public boolean equals(get_foreign_keys_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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_foreign_keys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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_foreign_keys_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_foreign_keys_argsStandardSchemeFactory implements SchemeFactory { public get_foreign_keys_argsStandardScheme getScheme() { return new get_foreign_keys_argsStandardScheme(); } } private static class get_foreign_keys_argsStandardScheme extends StandardScheme<get_foreign_keys_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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 ForeignKeysRequest(); 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_foreign_keys_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_foreign_keys_argsTupleSchemeFactory implements SchemeFactory { public get_foreign_keys_argsTupleScheme getScheme() { return new get_foreign_keys_argsTupleScheme(); } } private static class get_foreign_keys_argsTupleScheme extends TupleScheme<get_foreign_keys_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_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_foreign_keys_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new ForeignKeysRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class get_foreign_keys_result implements org.apache.thrift.TBase<get_foreign_keys_result, get_foreign_keys_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_foreign_keys_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_foreign_keys_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_foreign_keys_resultTupleSchemeFactory()); } private ForeignKeysResponse 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, ForeignKeysResponse.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_foreign_keys_result.class, metaDataMap); } public get_foreign_keys_result() { } public get_foreign_keys_result( ForeignKeysResponse success, MetaException o1, NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public get_foreign_keys_result(get_foreign_keys_result other) { if (other.isSetSuccess()) { this.success = new ForeignKeysResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_foreign_keys_result deepCopy() { return new get_foreign_keys_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public ForeignKeysResponse getSuccess() { return this.success; } public void setSuccess(ForeignKeysResponse 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((ForeignKeysResponse)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_foreign_keys_result) return this.equals((get_foreign_keys_result)that); return false; } public boolean equals(get_foreign_keys_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_foreign_keys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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_foreign_keys_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_foreign_keys_resultStandardSchemeFactory implements SchemeFactory { public get_foreign_keys_resultStandardScheme getScheme() { return new get_foreign_keys_resultStandardScheme(); } } private static class get_foreign_keys_resultStandardScheme extends StandardScheme<get_foreign_keys_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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 ForeignKeysResponse(); 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_foreign_keys_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_foreign_keys_resultTupleSchemeFactory implements SchemeFactory { public get_foreign_keys_resultTupleScheme getScheme() { return new get_foreign_keys_resultTupleScheme(); } } private static class get_foreign_keys_resultTupleScheme extends TupleScheme<get_foreign_keys_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_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_foreign_keys_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new ForeignKeysResponse(); 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 update_table_column_statistics_args implements org.apache.thrift.TBase<update_table_column_statistics_args, update_table_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<update_table_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_stats_obj = true && (isSetStats_obj()); list.add(present_stats_obj); if (present_stats_obj) list.add(stats_obj); return list.hashCode(); } @Override public int compareTo(update_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); if (lastComparison != 0) { return lastComparison; } if (isSetStats_obj()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.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<update_table_column_statistics_args> { 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<update_table_column_statistics_args> { @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<update_table_column_statistics_result, update_table_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<update_table_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(update_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<update_table_column_statistics_result> { 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<update_table_column_statistics_result> { @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<update_partition_column_statistics_args, update_partition_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<update_partition_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_stats_obj = true && (isSetStats_obj()); list.add(present_stats_obj); if (present_stats_obj) list.add(stats_obj); return list.hashCode(); } @Override public int compareTo(update_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); if (lastComparison != 0) { return lastComparison; } if (isSetStats_obj()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.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<update_partition_column_statistics_args> { 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<update_partition_column_statistics_args> { @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<update_partition_column_statistics_result, update_partition_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<update_partition_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(update_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<update_partition_column_statistics_result> { 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<update_partition_column_statistics_result> { @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<get_table_column_statistics_args, get_table_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_col_name = true && (isSetCol_name()); list.add(present_col_name); if (present_col_name) list.add(col_name); return list.hashCode(); } @Override public int compareTo(get_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.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<get_table_column_statistics_args> { 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<get_table_column_statistics_args> { @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<get_table_column_statistics_result, get_table_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(get_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<get_table_column_statistics_result> { 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<get_table_column_statistics_result> { @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<get_partition_column_statistics_args, get_partition_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); boolean present_col_name = true && (isSetCol_name()); list.add(present_col_name); if (present_col_name) list.add(col_name); return list.hashCode(); } @Override public int compareTo(get_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.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<get_partition_column_statistics_args> { 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<get_partition_column_statistics_args> { @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<get_partition_column_statistics_result, get_partition_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partition_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(get_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<get_partition_column_statistics_result> { 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<get_partition_column_statistics_result> { @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<get_table_statistics_req_args, get_table_statistics_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_statistics_req_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_table_statistics_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<get_table_statistics_req_args> { 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<get_table_statistics_req_args> { @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<get_table_statistics_req_result, get_table_statistics_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_table_statistics_req_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_table_statistics_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_table_statistics_req_result> { 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<get_table_statistics_req_result> { @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<get_partitions_statistics_req_args, get_partitions_statistics_req_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_statistics_req_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_partitions_statistics_req_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<get_partitions_statistics_req_args> { 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<get_partitions_statistics_req_args> { @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<get_partitions_statistics_req_result, get_partitions_statistics_req_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_partitions_statistics_req_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_partitions_statistics_req_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_partitions_statistics_req_result> { 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<get_partitions_statistics_req_result> { @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<get_aggr_stats_for_args, get_aggr_stats_for_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_aggr_stats_for_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_aggr_stats_for_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<get_aggr_stats_for_args> { 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<get_aggr_stats_for_args> { @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<get_aggr_stats_for_result, get_aggr_stats_for_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_aggr_stats_for_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_aggr_stats_for_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_aggr_stats_for_result> { 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<get_aggr_stats_for_result> { @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<set_aggr_stats_for_args, set_aggr_stats_for_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_aggr_stats_for_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(set_aggr_stats_for_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<set_aggr_stats_for_args> { 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<set_aggr_stats_for_args> { @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<set_aggr_stats_for_result, set_aggr_stats_for_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_aggr_stats_for_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(set_aggr_stats_for_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<set_aggr_stats_for_result> { 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<set_aggr_stats_for_result> { @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<delete_partition_column_statistics_args, delete_partition_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_partition_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_part_name = true && (isSetPart_name()); list.add(present_part_name); if (present_part_name) list.add(part_name); boolean present_col_name = true && (isSetCol_name()); list.add(present_col_name); if (present_col_name) list.add(col_name); return list.hashCode(); } @Override public int compareTo(delete_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.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<delete_partition_column_statistics_args> { 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<delete_partition_column_statistics_args> { @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<delete_partition_column_statistics_result, delete_partition_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_partition_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(delete_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<delete_partition_column_statistics_result> { 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<delete_partition_column_statistics_result> { @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<delete_table_column_statistics_args, delete_table_column_statistics_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_table_column_statistics_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_db_name = true && (isSetDb_name()); list.add(present_db_name); if (present_db_name) list.add(db_name); boolean present_tbl_name = true && (isSetTbl_name()); list.add(present_tbl_name); if (present_tbl_name) list.add(tbl_name); boolean present_col_name = true && (isSetCol_name()); list.add(present_col_name); if (present_col_name) list.add(col_name); return list.hashCode(); } @Override public int compareTo(delete_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } if (isSetCol_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.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<delete_table_column_statistics_args> { 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<delete_table_column_statistics_args> { @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<delete_table_column_statistics_result, delete_table_column_statistics_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_table_column_statistics_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(delete_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<delete_table_column_statistics_result> { 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<delete_table_column_statistics_result> { @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<create_function_args, create_function_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_function_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_func = true && (isSetFunc()); list.add(present_func); if (present_func) list.add(func); return list.hashCode(); } @Override public int compareTo(create_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetFunc()).compareTo(other.isSetFunc()); if (lastComparison != 0) { return lastComparison; } if (isSetFunc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.func, other.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<create_function_args> { 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<create_function_args> { @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<create_function_result, create_function_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_function_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); boolean present_o4 = true && (isSetO4()); list.add(present_o4); if (present_o4) list.add(o4); return list.hashCode(); } @Override public int compareTo(create_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.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<create_function_result> { 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<create_function_result> { @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<drop_function_args, drop_function_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_function_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_funcName = true && (isSetFuncName()); list.add(present_funcName); if (present_funcName) list.add(funcName); return list.hashCode(); } @Override public int compareTo(drop_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.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<drop_function_args> { 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<drop_function_args> { @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<drop_function_result, drop_function_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_function_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(drop_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<drop_function_result> { 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<drop_function_result> { @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<alter_function_args, alter_function_args._Fields>, java.io.Serializable, Cloneable, Comparable<alter_function_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_funcName = true && (isSetFuncName()); list.add(present_funcName); if (present_funcName) list.add(funcName); boolean present_newFunc = true && (isSetNewFunc()); list.add(present_newFunc); if (present_newFunc) list.add(newFunc); return list.hashCode(); } @Override public int compareTo(alter_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNewFunc()).compareTo(other.isSetNewFunc()); if (lastComparison != 0) { return lastComparison; } if (isSetNewFunc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFunc, other.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<alter_function_args> { 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<alter_function_args> { @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<alter_function_result, alter_function_result._Fields>, java.io.Serializable, Cloneable, Comparable<alter_function_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(alter_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<alter_function_result> { 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<alter_function_result> { @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<get_functions_args, get_functions_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_functions_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_pattern = true && (isSetPattern()); list.add(present_pattern); if (present_pattern) list.add(pattern); return list.hashCode(); } @Override public int compareTo(get_functions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.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<get_functions_args> { 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<get_functions_args> { @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<get_functions_result, get_functions_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_functions_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_functions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_functions_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_functions_result(get_functions_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_functions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_functions_result> { 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 _list1134 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1134.size); String _elem1135; for (int _i1136 = 0; _i1136 < _list1134.size; ++_i1136) { _elem1135 = iprot.readString(); struct.success.add(_elem1135); } 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 _iter1137 : struct.success) { oprot.writeString(_iter1137); } 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<get_functions_result> { @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 _iter1138 : struct.success) { oprot.writeString(_iter1138); } } } 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 _list1139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1139.size); String _elem1140; for (int _i1141 = 0; _i1141 < _list1139.size; ++_i1141) { _elem1140 = iprot.readString(); struct.success.add(_elem1140); } } 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<get_function_args, get_function_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_funcName = true && (isSetFuncName()); list.add(present_funcName); if (present_funcName) list.add(funcName); return list.hashCode(); } @Override public int compareTo(get_function_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); if (lastComparison != 0) { return lastComparison; } if (isSetFuncName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.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<get_function_args> { 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<get_function_args> { @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<get_function_result, get_function_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_function_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(get_function_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<get_function_result> { 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<get_function_result> { @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 get_all_functions_args implements org.apache.thrift.TBase<get_all_functions_args, get_all_functions_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_functions_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_functions_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_functions_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_functions_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_args.class, metaDataMap); } public get_all_functions_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_all_functions_args(get_all_functions_args other) { } public get_all_functions_args deepCopy() { return new get_all_functions_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_functions_args) return this.equals((get_all_functions_args)that); return false; } public boolean equals(get_all_functions_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_all_functions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_functions_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_functions_argsStandardSchemeFactory implements SchemeFactory { public get_all_functions_argsStandardScheme getScheme() { return new get_all_functions_argsStandardScheme(); } } private static class get_all_functions_argsStandardScheme extends StandardScheme<get_all_functions_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_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) { 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_functions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_functions_argsTupleSchemeFactory implements SchemeFactory { public get_all_functions_argsTupleScheme getScheme() { return new get_all_functions_argsTupleScheme(); } } private static class get_all_functions_argsTupleScheme extends TupleScheme<get_all_functions_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_all_functions_result implements org.apache.thrift.TBase<get_all_functions_result, get_all_functions_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_functions_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_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.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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_functions_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_functions_resultTupleSchemeFactory()); } private GetAllFunctionsResponse 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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, GetAllFunctionsResponse.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_all_functions_result.class, metaDataMap); } public get_all_functions_result() { } public get_all_functions_result( GetAllFunctionsResponse success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_all_functions_result(get_all_functions_result other) { if (other.isSetSuccess()) { this.success = new GetAllFunctionsResponse(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_all_functions_result deepCopy() { return new get_all_functions_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public GetAllFunctionsResponse getSuccess() { return this.success; } public void setSuccess(GetAllFunctionsResponse 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((GetAllFunctionsResponse)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_functions_result) return this.equals((get_all_functions_result)that); return false; } public boolean equals(get_all_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_all_functions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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_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 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_all_functions_resultStandardSchemeFactory implements SchemeFactory { public get_all_functions_resultStandardScheme getScheme() { return new get_all_functions_resultStandardScheme(); } } private static class get_all_functions_resultStandardScheme extends StandardScheme<get_all_functions_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_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.STRUCT) { struct.success = new GetAllFunctionsResponse(); 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_all_functions_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_all_functions_resultTupleSchemeFactory implements SchemeFactory { public get_all_functions_resultTupleScheme getScheme() { return new get_all_functions_resultTupleScheme(); } } private static class get_all_functions_resultTupleScheme extends TupleScheme<get_all_functions_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_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()) { struct.success.write(oprot); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetAllFunctionsResponse(); 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 create_role_args implements org.apache.thrift.TBase<create_role_args, create_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_role = true && (isSetRole()); list.add(present_role); if (present_role) list.add(role); return list.hashCode(); } @Override public int compareTo(create_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); if (lastComparison != 0) { return lastComparison; } if (isSetRole()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.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<create_role_args> { 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<create_role_args> { @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<create_role_result, create_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(create_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<create_role_result> { 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<create_role_result> { @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<drop_role_args, drop_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_role_name = true && (isSetRole_name()); list.add(present_role_name); if (present_role_name) list.add(role_name); return list.hashCode(); } @Override public int compareTo(drop_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.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<drop_role_args> { 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<drop_role_args> { @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<drop_role_result, drop_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(drop_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<drop_role_result> { 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<drop_role_result> { @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<get_role_names_args, get_role_names_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_role_names_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_args.class, metaDataMap); } public get_role_names_args() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_role_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<get_role_names_args> { 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<get_role_names_args> { @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<get_role_names_result, get_role_names_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_role_names_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_role_names_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_role_names_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_role_names_result(get_role_names_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_role_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_role_names_result> { 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 _list1142 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1142.size); String _elem1143; for (int _i1144 = 0; _i1144 < _list1142.size; ++_i1144) { _elem1143 = iprot.readString(); struct.success.add(_elem1143); } 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 _iter1145 : struct.success) { oprot.writeString(_iter1145); } 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<get_role_names_result> { @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 _iter1146 : struct.success) { oprot.writeString(_iter1146); } } } 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 _list1147 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1147.size); String _elem1148; for (int _i1149 = 0; _i1149 < _list1147.size; ++_i1149) { _elem1148 = iprot.readString(); struct.success.add(_elem1148); } } 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<grant_role_args, grant_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<grant_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_role_name = true && (isSetRole_name()); list.add(present_role_name); if (present_role_name) list.add(role_name); boolean present_principal_name = true && (isSetPrincipal_name()); list.add(present_principal_name); if (present_principal_name) list.add(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); list.add(present_principal_type); if (present_principal_type) list.add(principal_type.getValue()); boolean present_grantor = true && (isSetGrantor()); list.add(present_grantor); if (present_grantor) list.add(grantor); boolean present_grantorType = true && (isSetGrantorType()); list.add(present_grantorType); if (present_grantorType) list.add(grantorType.getValue()); boolean present_grant_option = true; list.add(present_grant_option); if (present_grant_option) list.add(grant_option); return list.hashCode(); } @Override public int compareTo(grant_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantorType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(other.isSetGrant_option()); if (lastComparison != 0) { return lastComparison; } if (isSetGrant_option()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_option, other.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<grant_role_args> { 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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<grant_role_args> { @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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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<grant_role_result, grant_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<grant_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(grant_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<grant_role_result> { 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<grant_role_result> { @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<revoke_role_args, revoke_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<revoke_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_role_name = true && (isSetRole_name()); list.add(present_role_name); if (present_role_name) list.add(role_name); boolean present_principal_name = true && (isSetPrincipal_name()); list.add(present_principal_name); if (present_principal_name) list.add(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); list.add(present_principal_type); if (present_principal_type) list.add(principal_type.getValue()); return list.hashCode(); } @Override public int compareTo(revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.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<revoke_role_args> { 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 = org.apache.hadoop.hive.metastore.api.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<revoke_role_args> { @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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } } } } public static class revoke_role_result implements org.apache.thrift.TBase<revoke_role_result, revoke_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<revoke_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<revoke_role_result> { 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<revoke_role_result> { @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<list_roles_args, list_roles_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_roles_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_principal_name = true && (isSetPrincipal_name()); list.add(present_principal_name); if (present_principal_name) list.add(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); list.add(present_principal_type); if (present_principal_type) list.add(principal_type.getValue()); return list.hashCode(); } @Override public int compareTo(list_roles_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.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<list_roles_args> { 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 = org.apache.hadoop.hive.metastore.api.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<list_roles_args> { @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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); struct.setPrincipal_typeIsSet(true); } } } } public static class list_roles_result implements org.apache.thrift.TBase<list_roles_result, list_roles_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_roles_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_roles_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_roles_resultTupleSchemeFactory()); } private List<Role> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<Role> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public list_roles_result(list_roles_result other) { if (other.isSetSuccess()) { List<Role> __this__success = new ArrayList<Role>(other.success.size()); 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<Role> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Role elem) { if (this.success == null) { this.success = new ArrayList<Role>(); } this.success.add(elem); } public List<Role> getSuccess() { return this.success; } public void setSuccess(List<Role> 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<Role>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(list_roles_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<list_roles_result> { 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 _list1150 = iprot.readListBegin(); struct.success = new ArrayList<Role>(_list1150.size); Role _elem1151; for (int _i1152 = 0; _i1152 < _list1150.size; ++_i1152) { _elem1151 = new Role(); _elem1151.read(iprot); struct.success.add(_elem1151); } 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 _iter1153 : struct.success) { _iter1153.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<list_roles_result> { @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 _iter1154 : struct.success) { _iter1154.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 _list1155 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Role>(_list1155.size); Role _elem1156; for (int _i1157 = 0; _i1157 < _list1155.size; ++_i1157) { _elem1156 = new Role(); _elem1156.read(iprot); struct.success.add(_elem1156); } } 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<grant_revoke_role_args, grant_revoke_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<grant_revoke_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(grant_revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<grant_revoke_role_args> { 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<grant_revoke_role_args> { @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<grant_revoke_role_result, grant_revoke_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<grant_revoke_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(grant_revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<grant_revoke_role_result> { 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<grant_revoke_role_result> { @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<get_principals_in_role_args, get_principals_in_role_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_principals_in_role_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(get_principals_in_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<get_principals_in_role_args> { 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<get_principals_in_role_args> { @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<get_principals_in_role_result, get_principals_in_role_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_principals_in_role_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_principals_in_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_principals_in_role_result> { 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<get_principals_in_role_result> { @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<get_role_grants_for_principal_args, get_role_grants_for_principal_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_role_grants_for_principal_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<get_role_grants_for_principal_args> { 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<get_role_grants_for_principal_args> { @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<get_role_grants_for_principal_result, get_role_grants_for_principal_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_role_grants_for_principal_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override 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; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_role_grants_for_principal_result> { 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<get_role_grants_for_principal_result> { @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<get_privilege_set_args, get_privilege_set_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_privilege_set_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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<String> group_names) { this(); this.hiveObject = hiveObject; this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on <i>other</i>. */ 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<String> __this__group_names = new ArrayList<String>(other.group_names); 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<String> 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<String>(); } this.group_names.add(elem); } public List<String> getGroup_names() { return this.group_names; } public void setGroup_names(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_hiveObject = true && (isSetHiveObject()); list.add(present_hiveObject); if (present_hiveObject) list.add(hiveObject); boolean present_user_name = true && (isSetUser_name()); list.add(present_user_name); if (present_user_name) list.add(user_name); boolean present_group_names = true && (isSetGroup_names()); list.add(present_group_names); if (present_group_names) list.add(group_names); return list.hashCode(); } @Override public int compareTo(get_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.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<get_privilege_set_args> { 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 _list1158 = iprot.readListBegin(); struct.group_names = new ArrayList<String>(_list1158.size); String _elem1159; for (int _i1160 = 0; _i1160 < _list1158.size; ++_i1160) { _elem1159 = iprot.readString(); struct.group_names.add(_elem1159); } 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 _iter1161 : struct.group_names) { oprot.writeString(_iter1161); } 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<get_privilege_set_args> { @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 _iter1162 : struct.group_names) { oprot.writeString(_iter1162); } } } } @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 _list1163 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList<String>(_list1163.size); String _elem1164; for (int _i1165 = 0; _i1165 < _list1163.size; ++_i1165) { _elem1164 = iprot.readString(); struct.group_names.add(_elem1164); } } struct.setGroup_namesIsSet(true); } } } } public static class get_privilege_set_result implements org.apache.thrift.TBase<get_privilege_set_result, get_privilege_set_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_privilege_set_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_privilege_set_result> { 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<get_privilege_set_result> { @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<list_privileges_args, list_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<list_privileges_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_principal_name = true && (isSetPrincipal_name()); list.add(present_principal_name); if (present_principal_name) list.add(principal_name); boolean present_principal_type = true && (isSetPrincipal_type()); list.add(present_principal_type); if (present_principal_type) list.add(principal_type.getValue()); boolean present_hiveObject = true && (isSetHiveObject()); list.add(present_hiveObject); if (present_hiveObject) list.add(hiveObject); return list.hashCode(); } @Override public int compareTo(list_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.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<list_privileges_args> { 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 = org.apache.hadoop.hive.metastore.api.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<list_privileges_args> { @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 = org.apache.hadoop.hive.metastore.api.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<list_privileges_result, list_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<list_privileges_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new list_privileges_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new list_privileges_resultTupleSchemeFactory()); } private List<HiveObjectPrivilege> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<HiveObjectPrivilege> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public list_privileges_result(list_privileges_result other) { if (other.isSetSuccess()) { List<HiveObjectPrivilege> __this__success = new ArrayList<HiveObjectPrivilege>(other.success.size()); 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<HiveObjectPrivilege> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(HiveObjectPrivilege elem) { if (this.success == null) { this.success = new ArrayList<HiveObjectPrivilege>(); } this.success.add(elem); } public List<HiveObjectPrivilege> getSuccess() { return this.success; } public void setSuccess(List<HiveObjectPrivilege> 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<HiveObjectPrivilege>)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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(list_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<list_privileges_result> { 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 _list1166 = iprot.readListBegin(); struct.success = new ArrayList<HiveObjectPrivilege>(_list1166.size); HiveObjectPrivilege _elem1167; for (int _i1168 = 0; _i1168 < _list1166.size; ++_i1168) { _elem1167 = new HiveObjectPrivilege(); _elem1167.read(iprot); struct.success.add(_elem1167); } 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 _iter1169 : struct.success) { _iter1169.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<list_privileges_result> { @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 _iter1170 : struct.success) { _iter1170.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 _list1171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<HiveObjectPrivilege>(_list1171.size); HiveObjectPrivilege _elem1172; for (int _i1173 = 0; _i1173 < _list1171.size; ++_i1173) { _elem1172 = new HiveObjectPrivilege(); _elem1172.read(iprot); struct.success.add(_elem1172); } } 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<grant_privileges_args, grant_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<grant_privileges_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_privileges = true && (isSetPrivileges()); list.add(present_privileges); if (present_privileges) list.add(privileges); return list.hashCode(); } @Override public int compareTo(grant_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.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<grant_privileges_args> { 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<grant_privileges_args> { @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<grant_privileges_result, grant_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<grant_privileges_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<grant_privileges_result> { 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<grant_privileges_result> { @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<revoke_privileges_args, revoke_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<revoke_privileges_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_privileges = true && (isSetPrivileges()); list.add(present_privileges); if (present_privileges) list.add(privileges); return list.hashCode(); } @Override public int compareTo(revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.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<revoke_privileges_args> { 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<revoke_privileges_args> { @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<revoke_privileges_result, revoke_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<revoke_privileges_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<revoke_privileges_result> { 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<revoke_privileges_result> { @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<grant_revoke_privileges_args, grant_revoke_privileges_args._Fields>, java.io.Serializable, Cloneable, Comparable<grant_revoke_privileges_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_request = true && (isSetRequest()); list.add(present_request); if (present_request) list.add(request); return list.hashCode(); } @Override public int compareTo(grant_revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.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<grant_revoke_privileges_args> { 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<grant_revoke_privileges_args> { @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<grant_revoke_privileges_result, grant_revoke_privileges_result._Fields>, java.io.Serializable, Cloneable, Comparable<grant_revoke_privileges_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(grant_revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<grant_revoke_privileges_result> { 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<grant_revoke_privileges_result> { @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<set_ugi_args, set_ugi_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_ugi_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String> 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_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<String> group_names) { this(); this.user_name = user_name; this.group_names = group_names; } /** * Performs a deep copy on <i>other</i>. */ public set_ugi_args(set_ugi_args other) { if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List<String> __this__group_names = new ArrayList<String>(other.group_names); 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<String> 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<String>(); } this.group_names.add(elem); } public List<String> getGroup_names() { return this.group_names; } public void setGroup_names(List<String> 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<String>)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() { List<Object> list = new ArrayList<Object>(); boolean present_user_name = true && (isSetUser_name()); list.add(present_user_name); if (present_user_name) list.add(user_name); boolean present_group_names = true && (isSetGroup_names()); list.add(present_group_names); if (present_group_names) list.add(group_names); return list.hashCode(); } @Override public int compareTo(set_ugi_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.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<set_ugi_args> { 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 _list1174 = iprot.readListBegin(); struct.group_names = new ArrayList<String>(_list1174.size); String _elem1175; for (int _i1176 = 0; _i1176 < _list1174.size; ++_i1176) { _elem1175 = iprot.readString(); struct.group_names.add(_elem1175); } 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 _iter1177 : struct.group_names) { oprot.writeString(_iter1177); } 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<set_ugi_args> { @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 _iter1178 : struct.group_names) { oprot.writeString(_iter1178); } } } } @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 _list1179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.group_names = new ArrayList<String>(_list1179.size); String _elem1180; for (int _i1181 = 0; _i1181 < _list1179.size; ++_i1181) { _elem1180 = iprot.readString(); struct.group_names.add(_elem1180); } } struct.setGroup_namesIsSet(true); } } } } public static class set_ugi_result implements org.apache.thrift.TBase<set_ugi_result, set_ugi_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_ugi_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_ugi_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_ugi_resultTupleSchemeFactory()); } private List<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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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<String> success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public set_ugi_result(set_ugi_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); 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<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public 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<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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(set_ugi_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<set_ugi_result> { 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 _list1182 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1182.size); String _elem1183; for (int _i1184 = 0; _i1184 < _list1182.size; ++_i1184) { _elem1183 = iprot.readString(); struct.success.add(_elem1183); } 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 _iter1185 : struct.success) { oprot.writeString(_iter1185); } 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<set_ugi_result> { @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 _iter1186 : struct.success) { oprot.writeString(_iter1186); } } } 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 _list1187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1187.size); String _elem1188; for (int _i1189 = 0; _i1189 < _list1187.size; ++_i1189) { _elem1188 = iprot.readString(); struct.success.add(_elem1188); } } 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<get_delegation_token_args, get_delegation_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_delegation_token_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_token_owner = true && (isSetToken_owner()); list.add(present_token_owner); if (present_token_owner) list.add(token_owner); boolean present_renewer_kerberos_principal_name = true && (isSetRenewer_kerberos_principal_name()); list.add(present_renewer_kerberos_principal_name); if (present_renewer_kerberos_principal_name) list.add(renewer_kerberos_principal_name); return list.hashCode(); } @Override public int compareTo(get_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_owner()).compareTo(other.isSetToken_owner()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_owner()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_owner, other.token_owner); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRenewer_kerberos_principal_name()).compareTo(other.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, other.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<get_delegation_token_args> { 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<get_delegation_token_args> { @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<get_delegation_token_result, get_delegation_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_delegation_token_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<get_delegation_token_result> { 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<get_delegation_token_result> { @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<renew_delegation_token_args, renew_delegation_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<renew_delegation_token_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_token_str_form = true && (isSetToken_str_form()); list.add(present_token_str_form); if (present_token_str_form) list.add(token_str_form); return list.hashCode(); } @Override public int compareTo(renew_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.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<renew_delegation_token_args> { 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<renew_delegation_token_args> { @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<renew_delegation_token_result, renew_delegation_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<renew_delegation_token_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(renew_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<renew_delegation_token_result> { 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<renew_delegation_token_result> { @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<cancel_delegation_token_args, cancel_delegation_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancel_delegation_token_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_token_str_form = true && (isSetToken_str_form()); list.add(present_token_str_form); if (present_token_str_form) list.add(token_str_form); return list.hashCode(); } @Override public int compareTo(cancel_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.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<cancel_delegation_token_args> { 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<cancel_delegation_token_args> { @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<cancel_delegation_token_result, cancel_delegation_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancel_delegation_token_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(cancel_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<cancel_delegation_token_result> { 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<cancel_delegation_token_result> { @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 add_token_args implements org.apache.thrift.TBase<add_token_args, add_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_token_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DELEGATION_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("delegation_token", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_token_argsTupleSchemeFactory()); } private String token_identifier; // required private String delegation_token; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN_IDENTIFIER((short)1, "token_identifier"), DELEGATION_TOKEN((short)2, "delegation_token"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_IDENTIFIER return TOKEN_IDENTIFIER; case 2: // DELEGATION_TOKEN return DELEGATION_TOKEN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DELEGATION_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("delegation_token", 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(add_token_args.class, metaDataMap); } public add_token_args() { } public add_token_args( String token_identifier, String delegation_token) { this(); this.token_identifier = token_identifier; this.delegation_token = delegation_token; } /** * Performs a deep copy on <i>other</i>. */ public add_token_args(add_token_args other) { if (other.isSetToken_identifier()) { this.token_identifier = other.token_identifier; } if (other.isSetDelegation_token()) { this.delegation_token = other.delegation_token; } } public add_token_args deepCopy() { return new add_token_args(this); } @Override public void clear() { this.token_identifier = null; this.delegation_token = null; } public String getToken_identifier() { return this.token_identifier; } public void setToken_identifier(String token_identifier) { this.token_identifier = token_identifier; } public void unsetToken_identifier() { this.token_identifier = null; } /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ public boolean isSetToken_identifier() { return this.token_identifier != null; } public void setToken_identifierIsSet(boolean value) { if (!value) { this.token_identifier = null; } } public String getDelegation_token() { return this.delegation_token; } public void setDelegation_token(String delegation_token) { this.delegation_token = delegation_token; } public void unsetDelegation_token() { this.delegation_token = null; } /** Returns true if field delegation_token is set (has been assigned a value) and false otherwise */ public boolean isSetDelegation_token() { return this.delegation_token != null; } public void setDelegation_tokenIsSet(boolean value) { if (!value) { this.delegation_token = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_IDENTIFIER: if (value == null) { unsetToken_identifier(); } else { setToken_identifier((String)value); } break; case DELEGATION_TOKEN: if (value == null) { unsetDelegation_token(); } else { setDelegation_token((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_IDENTIFIER: return getToken_identifier(); case DELEGATION_TOKEN: return getDelegation_token(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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_IDENTIFIER: return isSetToken_identifier(); case DELEGATION_TOKEN: return isSetDelegation_token(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_token_args) return this.equals((add_token_args)that); return false; } public boolean equals(add_token_args that) { if (that == null) return false; boolean this_present_token_identifier = true && this.isSetToken_identifier(); boolean that_present_token_identifier = true && that.isSetToken_identifier(); if (this_present_token_identifier || that_present_token_identifier) { if (!(this_present_token_identifier && that_present_token_identifier)) return false; if (!this.token_identifier.equals(that.token_identifier)) return false; } boolean this_present_delegation_token = true && this.isSetDelegation_token(); boolean that_present_delegation_token = true && that.isSetDelegation_token(); if (this_present_delegation_token || that_present_delegation_token) { if (!(this_present_delegation_token && that_present_delegation_token)) return false; if (!this.delegation_token.equals(that.delegation_token)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_token_identifier = true && (isSetToken_identifier()); list.add(present_token_identifier); if (present_token_identifier) list.add(token_identifier); boolean present_delegation_token = true && (isSetDelegation_token()); list.add(present_delegation_token); if (present_delegation_token) list.add(delegation_token); return list.hashCode(); } @Override public int compareTo(add_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_identifier()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDelegation_token()).compareTo(other.isSetDelegation_token()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegation_token()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegation_token, other.delegation_token); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_token_args("); boolean first = true; sb.append("token_identifier:"); if (this.token_identifier == null) { sb.append("null"); } else { sb.append(this.token_identifier); } first = false; if (!first) sb.append(", "); sb.append("delegation_token:"); if (this.delegation_token == null) { sb.append("null"); } else { sb.append(this.delegation_token); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.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_token_argsStandardSchemeFactory implements SchemeFactory { public add_token_argsStandardScheme getScheme() { return new add_token_argsStandardScheme(); } } private static class add_token_argsStandardScheme extends StandardScheme<add_token_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_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_IDENTIFIER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DELEGATION_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.delegation_token = iprot.readString(); struct.setDelegation_tokenIsSet(true); } else { 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_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_identifier != null) { oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); oprot.writeString(struct.token_identifier); oprot.writeFieldEnd(); } if (struct.delegation_token != null) { oprot.writeFieldBegin(DELEGATION_TOKEN_FIELD_DESC); oprot.writeString(struct.delegation_token); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_token_argsTupleSchemeFactory implements SchemeFactory { public add_token_argsTupleScheme getScheme() { return new add_token_argsTupleScheme(); } } private static class add_token_argsTupleScheme extends TupleScheme<add_token_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_identifier()) { optionals.set(0); } if (struct.isSetDelegation_token()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetToken_identifier()) { oprot.writeString(struct.token_identifier); } if (struct.isSetDelegation_token()) { oprot.writeString(struct.delegation_token); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } if (incoming.get(1)) { struct.delegation_token = iprot.readString(); struct.setDelegation_tokenIsSet(true); } } } } public static class add_token_result implements org.apache.thrift.TBase<add_token_result, add_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_token_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_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.BOOL, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_token_resultTupleSchemeFactory()); } private boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_token_result.class, metaDataMap); } public add_token_result() { } public add_token_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public add_token_result(add_token_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public add_token_result deepCopy() { return new add_token_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_token_result) return this.equals((add_token_result)that); return false; } public boolean equals(add_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(add_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("add_token_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class add_token_resultStandardSchemeFactory implements SchemeFactory { public add_token_resultStandardScheme getScheme() { return new add_token_resultStandardScheme(); } } private static class add_token_resultStandardScheme extends StandardScheme<add_token_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_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.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, add_token_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_token_resultTupleSchemeFactory implements SchemeFactory { public add_token_resultTupleScheme getScheme() { return new add_token_resultTupleScheme(); } } private static class add_token_resultTupleScheme extends TupleScheme<add_token_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class remove_token_args implements org.apache.thrift.TBase<remove_token_args, remove_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<remove_token_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_token_argsTupleSchemeFactory()); } private String token_identifier; // required /** 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_IDENTIFIER((short)1, "token_identifier"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_IDENTIFIER return TOKEN_IDENTIFIER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 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_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", 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(remove_token_args.class, metaDataMap); } public remove_token_args() { } public remove_token_args( String token_identifier) { this(); this.token_identifier = token_identifier; } /** * Performs a deep copy on <i>other</i>. */ public remove_token_args(remove_token_args other) { if (other.isSetToken_identifier()) { this.token_identifier = other.token_identifier; } } public remove_token_args deepCopy() { return new remove_token_args(this); } @Override public void clear() { this.token_identifier = null; } public String getToken_identifier() { return this.token_identifier; } public void setToken_identifier(String token_identifier) { this.token_identifier = token_identifier; } public void unsetToken_identifier() { this.token_identifier = null; } /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ public boolean isSetToken_identifier() { return this.token_identifier != null; } public void setToken_identifierIsSet(boolean value) { if (!value) { this.token_identifier = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_IDENTIFIER: if (value == null) { unsetToken_identifier(); } else { setToken_identifier((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_IDENTIFIER: return getToken_identifier(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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_IDENTIFIER: return isSetToken_identifier(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_token_args) return this.equals((remove_token_args)that); return false; } public boolean equals(remove_token_args that) { if (that == null) return false; boolean this_present_token_identifier = true && this.isSetToken_identifier(); boolean that_present_token_identifier = true && that.isSetToken_identifier(); if (this_present_token_identifier || that_present_token_identifier) { if (!(this_present_token_identifier && that_present_token_identifier)) return false; if (!this.token_identifier.equals(that.token_identifier)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_token_identifier = true && (isSetToken_identifier()); list.add(present_token_identifier); if (present_token_identifier) list.add(token_identifier); return list.hashCode(); } @Override public int compareTo(remove_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_identifier()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_token_args("); boolean first = true; sb.append("token_identifier:"); if (this.token_identifier == null) { sb.append("null"); } else { sb.append(this.token_identifier); } 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 remove_token_argsStandardSchemeFactory implements SchemeFactory { public remove_token_argsStandardScheme getScheme() { return new remove_token_argsStandardScheme(); } } private static class remove_token_argsStandardScheme extends StandardScheme<remove_token_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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_IDENTIFIER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } else { 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, remove_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_identifier != null) { oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); oprot.writeString(struct.token_identifier); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_token_argsTupleSchemeFactory implements SchemeFactory { public remove_token_argsTupleScheme getScheme() { return new remove_token_argsTupleScheme(); } } private static class remove_token_argsTupleScheme extends TupleScheme<remove_token_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_identifier()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken_identifier()) { oprot.writeString(struct.token_identifier); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } } } } public static class remove_token_result implements org.apache.thrift.TBase<remove_token_result, remove_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<remove_token_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_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.BOOL, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_token_resultTupleSchemeFactory()); } private boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_token_result.class, metaDataMap); } public remove_token_result() { } public remove_token_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public remove_token_result(remove_token_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public remove_token_result deepCopy() { return new remove_token_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_token_result) return this.equals((remove_token_result)that); return false; } public boolean equals(remove_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(remove_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_token_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class remove_token_resultStandardSchemeFactory implements SchemeFactory { public remove_token_resultStandardScheme getScheme() { return new remove_token_resultStandardScheme(); } } private static class remove_token_resultStandardScheme extends StandardScheme<remove_token_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, remove_token_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_token_resultTupleSchemeFactory implements SchemeFactory { public remove_token_resultTupleScheme getScheme() { return new remove_token_resultTupleScheme(); } } private static class remove_token_resultTupleScheme extends TupleScheme<remove_token_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class get_token_args implements org.apache.thrift.TBase<get_token_args, get_token_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_token_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_token_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_token_argsTupleSchemeFactory()); } private String token_identifier; // required /** 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_IDENTIFIER((short)1, "token_identifier"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TOKEN_IDENTIFIER return TOKEN_IDENTIFIER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 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_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", 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_token_args.class, metaDataMap); } public get_token_args() { } public get_token_args( String token_identifier) { this(); this.token_identifier = token_identifier; } /** * Performs a deep copy on <i>other</i>. */ public get_token_args(get_token_args other) { if (other.isSetToken_identifier()) { this.token_identifier = other.token_identifier; } } public get_token_args deepCopy() { return new get_token_args(this); } @Override public void clear() { this.token_identifier = null; } public String getToken_identifier() { return this.token_identifier; } public void setToken_identifier(String token_identifier) { this.token_identifier = token_identifier; } public void unsetToken_identifier() { this.token_identifier = null; } /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ public boolean isSetToken_identifier() { return this.token_identifier != null; } public void setToken_identifierIsSet(boolean value) { if (!value) { this.token_identifier = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TOKEN_IDENTIFIER: if (value == null) { unsetToken_identifier(); } else { setToken_identifier((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_IDENTIFIER: return getToken_identifier(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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_IDENTIFIER: return isSetToken_identifier(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_token_args) return this.equals((get_token_args)that); return false; } public boolean equals(get_token_args that) { if (that == null) return false; boolean this_present_token_identifier = true && this.isSetToken_identifier(); boolean that_present_token_identifier = true && that.isSetToken_identifier(); if (this_present_token_identifier || that_present_token_identifier) { if (!(this_present_token_identifier && that_present_token_identifier)) return false; if (!this.token_identifier.equals(that.token_identifier)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_token_identifier = true && (isSetToken_identifier()); list.add(present_token_identifier); if (present_token_identifier) list.add(token_identifier); return list.hashCode(); } @Override public int compareTo(get_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_identifier()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_token_args("); boolean first = true; sb.append("token_identifier:"); if (this.token_identifier == null) { sb.append("null"); } else { sb.append(this.token_identifier); } 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_token_argsStandardSchemeFactory implements SchemeFactory { public get_token_argsStandardScheme getScheme() { return new get_token_argsStandardScheme(); } } private static class get_token_argsStandardScheme extends StandardScheme<get_token_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_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_IDENTIFIER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } else { 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_token_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token_identifier != null) { oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); oprot.writeString(struct.token_identifier); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_token_argsTupleSchemeFactory implements SchemeFactory { public get_token_argsTupleScheme getScheme() { return new get_token_argsTupleScheme(); } } private static class get_token_argsTupleScheme extends TupleScheme<get_token_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetToken_identifier()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken_identifier()) { oprot.writeString(struct.token_identifier); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token_identifier = iprot.readString(); struct.setToken_identifierIsSet(true); } } } } public static class get_token_result implements org.apache.thrift.TBase<get_token_result, get_token_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_token_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_token_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_token_resultTupleSchemeFactory()); } private String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_token_result.class, metaDataMap); } public get_token_result() { } public get_token_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_token_result(get_token_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public get_token_result deepCopy() { return new get_token_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public void setSuccess(String success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_token_result) return this.equals((get_token_result)that); return false; } public boolean equals(get_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_token_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_token_resultStandardSchemeFactory implements SchemeFactory { public get_token_resultStandardScheme getScheme() { return new get_token_resultStandardScheme(); } } private static class get_token_resultStandardScheme extends StandardScheme<get_token_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_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; 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_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(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_token_resultTupleSchemeFactory implements SchemeFactory { public get_token_resultTupleScheme getScheme() { return new get_token_resultTupleScheme(); } } private static class get_token_resultTupleScheme extends TupleScheme<get_token_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } } public static class get_all_token_identifiers_args implements org.apache.thrift.TBase<get_all_token_identifiers_args, get_all_token_identifiers_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_token_identifiers_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_token_identifiers_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_token_identifiers_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_args.class, metaDataMap); } public get_all_token_identifiers_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_all_token_identifiers_args(get_all_token_identifiers_args other) { } public get_all_token_identifiers_args deepCopy() { return new get_all_token_identifiers_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_token_identifiers_args) return this.equals((get_all_token_identifiers_args)that); return false; } public boolean equals(get_all_token_identifiers_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_all_token_identifiers_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_token_identifiers_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_token_identifiers_argsStandardSchemeFactory implements SchemeFactory { public get_all_token_identifiers_argsStandardScheme getScheme() { return new get_all_token_identifiers_argsStandardScheme(); } } private static class get_all_token_identifiers_argsStandardScheme extends StandardScheme<get_all_token_identifiers_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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_token_identifiers_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_token_identifiers_argsTupleSchemeFactory implements SchemeFactory { public get_all_token_identifiers_argsTupleScheme getScheme() { return new get_all_token_identifiers_argsTupleScheme(); } } private static class get_all_token_identifiers_argsTupleScheme extends TupleScheme<get_all_token_identifiers_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_all_token_identifiers_result implements org.apache.thrift.TBase<get_all_token_identifiers_result, get_all_token_identifiers_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_all_token_identifiers_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_all_token_identifiers_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_all_token_identifiers_resultTupleSchemeFactory()); } private List<String> success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_result.class, metaDataMap); } public get_all_token_identifiers_result() { } public get_all_token_identifiers_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_all_token_identifiers_result(get_all_token_identifiers_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); this.success = __this__success; } } public get_all_token_identifiers_result deepCopy() { return new get_all_token_identifiers_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_all_token_identifiers_result) return this.equals((get_all_token_identifiers_result)that); return false; } public boolean equals(get_all_token_identifiers_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_all_token_identifiers_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_all_token_identifiers_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_all_token_identifiers_resultStandardSchemeFactory implements SchemeFactory { public get_all_token_identifiers_resultStandardScheme getScheme() { return new get_all_token_identifiers_resultStandardScheme(); } } private static class get_all_token_identifiers_resultStandardScheme extends StandardScheme<get_all_token_identifiers_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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 _list1190 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1190.size); String _elem1191; for (int _i1192 = 0; _i1192 < _list1190.size; ++_i1192) { _elem1191 = iprot.readString(); struct.success.add(_elem1191); } iprot.readListEnd(); } 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_all_token_identifiers_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 _iter1193 : struct.success) { oprot.writeString(_iter1193); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_all_token_identifiers_resultTupleSchemeFactory implements SchemeFactory { public get_all_token_identifiers_resultTupleScheme getScheme() { return new get_all_token_identifiers_resultTupleScheme(); } } private static class get_all_token_identifiers_resultTupleScheme extends TupleScheme<get_all_token_identifiers_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter1194 : struct.success) { oprot.writeString(_iter1194); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list1195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1195.size); String _elem1196; for (int _i1197 = 0; _i1197 < _list1195.size; ++_i1197) { _elem1196 = iprot.readString(); struct.success.add(_elem1196); } } struct.setSuccessIsSet(true); } } } } public static class add_master_key_args implements org.apache.thrift.TBase<add_master_key_args, add_master_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_master_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_master_key_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_master_key_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(add_master_key_args.class, metaDataMap); } public add_master_key_args() { } public add_master_key_args( String key) { this(); this.key = key; } /** * Performs a deep copy on <i>other</i>. */ public add_master_key_args(add_master_key_args other) { if (other.isSetKey()) { this.key = other.key; } } public add_master_key_args deepCopy() { return new add_master_key_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 add_master_key_args) return this.equals((add_master_key_args)that); return false; } public boolean equals(add_master_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_key = true && (isSetKey()); list.add(present_key); if (present_key) list.add(key); return list.hashCode(); } @Override public int compareTo(add_master_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.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("add_master_key_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 add_master_key_argsStandardSchemeFactory implements SchemeFactory { public add_master_key_argsStandardScheme getScheme() { return new add_master_key_argsStandardScheme(); } } private static class add_master_key_argsStandardScheme extends StandardScheme<add_master_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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, add_master_key_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 add_master_key_argsTupleSchemeFactory implements SchemeFactory { public add_master_key_argsTupleScheme getScheme() { return new add_master_key_argsTupleScheme(); } } private static class add_master_key_argsTupleScheme extends TupleScheme<add_master_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_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, add_master_key_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 add_master_key_result implements org.apache.thrift.TBase<add_master_key_result, add_master_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_master_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new add_master_key_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new add_master_key_resultTupleSchemeFactory()); } private int 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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.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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_master_key_result.class, metaDataMap); } public add_master_key_result() { } public add_master_key_result( int success, MetaException o1) { this(); this.success = success; setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public add_master_key_result(add_master_key_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public add_master_key_result deepCopy() { return new add_master_key_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.o1 = 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 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((Integer)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 add_master_key_result) return this.equals((add_master_key_result)that); return false; } public boolean equals(add_master_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(add_master_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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("add_master_key_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 add_master_key_resultStandardSchemeFactory implements SchemeFactory { public add_master_key_resultStandardScheme getScheme() { return new add_master_key_resultStandardScheme(); } } private static class add_master_key_resultStandardScheme extends StandardScheme<add_master_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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 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, add_master_key_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(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class add_master_key_resultTupleSchemeFactory implements SchemeFactory { public add_master_key_resultTupleScheme getScheme() { return new add_master_key_resultTupleScheme(); } } private static class add_master_key_resultTupleScheme extends TupleScheme<add_master_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_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); } if (struct.isSetO1()) { struct.o1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, add_master_key_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.o1 = new MetaException(); struct.o1.read(iprot); struct.setO1IsSet(true); } } } } public static class update_master_key_args implements org.apache.thrift.TBase<update_master_key_args, update_master_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<update_master_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_args"); private static final org.apache.thrift.protocol.TField SEQ_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("seq_number", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_master_key_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_master_key_argsTupleSchemeFactory()); } private int seq_number; // required 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 { SEQ_NUMBER((short)1, "seq_number"), KEY((short)2, "key"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SEQ_NUMBER return SEQ_NUMBER; case 2: // 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 private static final int __SEQ_NUMBER_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.SEQ_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("seq_number", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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(update_master_key_args.class, metaDataMap); } public update_master_key_args() { } public update_master_key_args( int seq_number, String key) { this(); this.seq_number = seq_number; setSeq_numberIsSet(true); this.key = key; } /** * Performs a deep copy on <i>other</i>. */ public update_master_key_args(update_master_key_args other) { __isset_bitfield = other.__isset_bitfield; this.seq_number = other.seq_number; if (other.isSetKey()) { this.key = other.key; } } public update_master_key_args deepCopy() { return new update_master_key_args(this); } @Override public void clear() { setSeq_numberIsSet(false); this.seq_number = 0; this.key = null; } public int getSeq_number() { return this.seq_number; } public void setSeq_number(int seq_number) { this.seq_number = seq_number; setSeq_numberIsSet(true); } public void unsetSeq_number() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); } /** Returns true if field seq_number is set (has been assigned a value) and false otherwise */ public boolean isSetSeq_number() { return EncodingUtils.testBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); } public void setSeq_numberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID, value); } 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 SEQ_NUMBER: if (value == null) { unsetSeq_number(); } else { setSeq_number((Integer)value); } break; case KEY: if (value == null) { unsetKey(); } else { setKey((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SEQ_NUMBER: return getSeq_number(); 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 SEQ_NUMBER: return isSetSeq_number(); case KEY: return isSetKey(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof update_master_key_args) return this.equals((update_master_key_args)that); return false; } public boolean equals(update_master_key_args that) { if (that == null) return false; boolean this_present_seq_number = true; boolean that_present_seq_number = true; if (this_present_seq_number || that_present_seq_number) { if (!(this_present_seq_number && that_present_seq_number)) return false; if (this.seq_number != that.seq_number) 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() { List<Object> list = new ArrayList<Object>(); boolean present_seq_number = true; list.add(present_seq_number); if (present_seq_number) list.add(seq_number); boolean present_key = true && (isSetKey()); list.add(present_key); if (present_key) list.add(key); return list.hashCode(); } @Override public int compareTo(update_master_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSeq_number()).compareTo(other.isSetSeq_number()); if (lastComparison != 0) { return lastComparison; } if (isSetSeq_number()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seq_number, other.seq_number); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); if (lastComparison != 0) { return lastComparison; } if (isSetKey()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.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("update_master_key_args("); boolean first = true; sb.append("seq_number:"); sb.append(this.seq_number); first = false; if (!first) sb.append(", "); 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 { // 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_master_key_argsStandardSchemeFactory implements SchemeFactory { public update_master_key_argsStandardScheme getScheme() { return new update_master_key_argsStandardScheme(); } } private static class update_master_key_argsStandardScheme extends StandardScheme<update_master_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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: // SEQ_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.seq_number = iprot.readI32(); struct.setSeq_numberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; 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_master_key_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SEQ_NUMBER_FIELD_DESC); oprot.writeI32(struct.seq_number); oprot.writeFieldEnd(); if (struct.key != null) { oprot.writeFieldBegin(KEY_FIELD_DESC); oprot.writeString(struct.key); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class update_master_key_argsTupleSchemeFactory implements SchemeFactory { public update_master_key_argsTupleScheme getScheme() { return new update_master_key_argsTupleScheme(); } } private static class update_master_key_argsTupleScheme extends TupleScheme<update_master_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSeq_number()) { optionals.set(0); } if (struct.isSetKey()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSeq_number()) { oprot.writeI32(struct.seq_number); } if (struct.isSetKey()) { oprot.writeString(struct.key); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.seq_number = iprot.readI32(); struct.setSeq_numberIsSet(true); } if (incoming.get(1)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } } } } public static class update_master_key_result implements org.apache.thrift.TBase<update_master_key_result, update_master_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<update_master_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new update_master_key_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new update_master_key_resultTupleSchemeFactory()); } 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 { O1((short)1, "o1"), O2((short)2, "o2"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(update_master_key_result.class, metaDataMap); } public update_master_key_result() { } public update_master_key_result( NoSuchObjectException o1, MetaException o2) { this(); this.o1 = o1; this.o2 = o2; } /** * Performs a deep copy on <i>other</i>. */ public update_master_key_result(update_master_key_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public update_master_key_result deepCopy() { return new update_master_key_result(this); } @Override public void clear() { this.o1 = null; this.o2 = 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 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 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 update_master_key_result) return this.equals((update_master_key_result)that); return false; } public boolean equals(update_master_key_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(update_master_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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("update_master_key_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 update_master_key_resultStandardSchemeFactory implements SchemeFactory { public update_master_key_resultStandardScheme getScheme() { return new update_master_key_resultStandardScheme(); } } private static class update_master_key_resultStandardScheme extends StandardScheme<update_master_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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 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, update_master_key_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 update_master_key_resultTupleSchemeFactory implements SchemeFactory { public update_master_key_resultTupleScheme getScheme() { return new update_master_key_resultTupleScheme(); } } private static class update_master_key_resultTupleScheme extends TupleScheme<update_master_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_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, update_master_key_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.o2 = new MetaException(); struct.o2.read(iprot); struct.setO2IsSet(true); } } } } public static class remove_master_key_args implements org.apache.thrift.TBase<remove_master_key_args, remove_master_key_args._Fields>, java.io.Serializable, Cloneable, Comparable<remove_master_key_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_args"); private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_master_key_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_master_key_argsTupleSchemeFactory()); } private int key_seq; // required /** 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_SEQ((short)1, "key_seq"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEY_SEQ return KEY_SEQ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final 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 __KEY_SEQ_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", 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(remove_master_key_args.class, metaDataMap); } public remove_master_key_args() { } public remove_master_key_args( int key_seq) { this(); this.key_seq = key_seq; setKey_seqIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public remove_master_key_args(remove_master_key_args other) { __isset_bitfield = other.__isset_bitfield; this.key_seq = other.key_seq; } public remove_master_key_args deepCopy() { return new remove_master_key_args(this); } @Override public void clear() { setKey_seqIsSet(false); this.key_seq = 0; } public int getKey_seq() { return this.key_seq; } public void setKey_seq(int key_seq) { this.key_seq = key_seq; setKey_seqIsSet(true); } public void unsetKey_seq() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); } /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ public boolean isSetKey_seq() { return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); } public void setKey_seqIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case KEY_SEQ: if (value == null) { unsetKey_seq(); } else { setKey_seq((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case KEY_SEQ: return getKey_seq(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID 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_SEQ: return isSetKey_seq(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_master_key_args) return this.equals((remove_master_key_args)that); return false; } public boolean equals(remove_master_key_args that) { if (that == null) return false; boolean this_present_key_seq = true; boolean that_present_key_seq = true; if (this_present_key_seq || that_present_key_seq) { if (!(this_present_key_seq && that_present_key_seq)) return false; if (this.key_seq != that.key_seq) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_key_seq = true; list.add(present_key_seq); if (present_key_seq) list.add(key_seq); return list.hashCode(); } @Override public int compareTo(remove_master_key_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); if (lastComparison != 0) { return lastComparison; } if (isSetKey_seq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_master_key_args("); boolean first = true; sb.append("key_seq:"); sb.append(this.key_seq); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class remove_master_key_argsStandardSchemeFactory implements SchemeFactory { public remove_master_key_argsStandardScheme getScheme() { return new remove_master_key_argsStandardScheme(); } } private static class remove_master_key_argsStandardScheme extends StandardScheme<remove_master_key_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_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_SEQ if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.key_seq = iprot.readI32(); struct.setKey_seqIsSet(true); } else { 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, remove_master_key_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); oprot.writeI32(struct.key_seq); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_master_key_argsTupleSchemeFactory implements SchemeFactory { public remove_master_key_argsTupleScheme getScheme() { return new remove_master_key_argsTupleScheme(); } } private static class remove_master_key_argsTupleScheme extends TupleScheme<remove_master_key_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetKey_seq()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetKey_seq()) { oprot.writeI32(struct.key_seq); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.key_seq = iprot.readI32(); struct.setKey_seqIsSet(true); } } } } public static class remove_master_key_result implements org.apache.thrift.TBase<remove_master_key_result, remove_master_key_result._Fields>, java.io.Serializable, Cloneable, Comparable<remove_master_key_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new remove_master_key_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new remove_master_key_resultTupleSchemeFactory()); } private boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_master_key_result.class, metaDataMap); } public remove_master_key_result() { } public remove_master_key_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public remove_master_key_result(remove_master_key_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public remove_master_key_result deepCopy() { return new remove_master_key_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_master_key_result) return this.equals((remove_master_key_result)that); return false; } public boolean equals(remove_master_key_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(remove_master_key_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_master_key_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class remove_master_key_resultStandardSchemeFactory implements SchemeFactory { public remove_master_key_resultStandardScheme getScheme() { return new remove_master_key_resultStandardScheme(); } } private static class remove_master_key_resultStandardScheme extends StandardScheme<remove_master_key_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, remove_master_key_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class remove_master_key_resultTupleSchemeFactory implements SchemeFactory { public remove_master_key_resultTupleScheme getScheme() { return new remove_master_key_resultTupleScheme(); } } private static class remove_master_key_resultTupleScheme extends TupleScheme<remove_master_key_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class get_master_keys_args implements org.apache.thrift.TBase<get_master_keys_args, get_master_keys_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_master_keys_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_master_keys_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_master_keys_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_args.class, metaDataMap); } public get_master_keys_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_master_keys_args(get_master_keys_args other) { } public get_master_keys_args deepCopy() { return new get_master_keys_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_master_keys_args) return this.equals((get_master_keys_args)that); return false; } public boolean equals(get_master_keys_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_master_keys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_master_keys_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_master_keys_argsStandardSchemeFactory implements SchemeFactory { public get_master_keys_argsStandardScheme getScheme() { return new get_master_keys_argsStandardScheme(); } } private static class get_master_keys_argsStandardScheme extends StandardScheme<get_master_keys_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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_master_keys_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_master_keys_argsTupleSchemeFactory implements SchemeFactory { public get_master_keys_argsTupleScheme getScheme() { return new get_master_keys_argsTupleScheme(); } } private static class get_master_keys_argsTupleScheme extends TupleScheme<get_master_keys_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_master_keys_result implements org.apache.thrift.TBase<get_master_keys_result, get_master_keys_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_master_keys_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_master_keys_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_master_keys_resultTupleSchemeFactory()); } private List<String> success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_result.class, metaDataMap); } public get_master_keys_result() { } public get_master_keys_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_master_keys_result(get_master_keys_result other) { if (other.isSetSuccess()) { List<String> __this__success = new ArrayList<String>(other.success); this.success = __this__success; } } public get_master_keys_result deepCopy() { return new get_master_keys_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> getSuccess() { return this.success; } public void setSuccess(List<String> success) { this.success = success; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_master_keys_result) return this.equals((get_master_keys_result)that); return false; } public boolean equals(get_master_keys_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_master_keys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_master_keys_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_master_keys_resultStandardSchemeFactory implements SchemeFactory { public get_master_keys_resultStandardScheme getScheme() { return new get_master_keys_resultStandardScheme(); } } private static class get_master_keys_resultStandardScheme extends StandardScheme<get_master_keys_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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 _list1198 = iprot.readListBegin(); struct.success = new ArrayList<String>(_list1198.size); String _elem1199; for (int _i1200 = 0; _i1200 < _list1198.size; ++_i1200) { _elem1199 = iprot.readString(); struct.success.add(_elem1199); } iprot.readListEnd(); } 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_master_keys_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 _iter1201 : struct.success) { oprot.writeString(_iter1201); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_master_keys_resultTupleSchemeFactory implements SchemeFactory { public get_master_keys_resultTupleScheme getScheme() { return new get_master_keys_resultTupleScheme(); } } private static class get_master_keys_resultTupleScheme extends TupleScheme<get_master_keys_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (String _iter1202 : struct.success) { oprot.writeString(_iter1202); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list1203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new ArrayList<String>(_list1203.size); String _elem1204; for (int _i1205 = 0; _i1205 < _list1203.size; ++_i1205) { _elem1204 = iprot.readString(); struct.success.add(_elem1204); } } struct.setSuccessIsSet(true); } } } } public static class get_open_txns_args implements org.apache.thrift.TBase<get_open_txns_args, get_open_txns_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_open_txns_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_args.class, metaDataMap); } public get_open_txns_args() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_open_txns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<get_open_txns_args> { 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<get_open_txns_args> { @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<get_open_txns_result, get_open_txns_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_open_txns_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_open_txns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<get_open_txns_result> { 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<get_open_txns_result> { @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<get_open_txns_info_args, get_open_txns_info_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_open_txns_info_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_args.class, metaDataMap); } public get_open_txns_info_args() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_open_txns_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<get_open_txns_info_args> { 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<get_open_txns_info_args> { @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<get_open_txns_info_result, get_open_txns_info_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_open_txns_info_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_open_txns_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<get_open_txns_info_result> { 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<get_open_txns_info_result> { @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<open_txns_args, open_txns_args._Fields>, java.io.Serializable, Cloneable, Comparable<open_txns_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(open_txns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<open_txns_args> { 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<open_txns_args> { @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<open_txns_result, open_txns_result._Fields>, java.io.Serializable, Cloneable, Comparable<open_txns_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(open_txns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<open_txns_result> { 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<open_txns_result> { @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<abort_txn_args, abort_txn_args._Fields>, java.io.Serializable, Cloneable, Comparable<abort_txn_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(abort_txn_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<abort_txn_args> { 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<abort_txn_args> { @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<abort_txn_result, abort_txn_result._Fields>, java.io.Serializable, Cloneable, Comparable<abort_txn_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(abort_txn_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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<abort_txn_result> { 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<abort_txn_result> { @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 abort_txns_args implements org.apache.thrift.TBase<abort_txns_args, abort_txns_args._Fields>, java.io.Serializable, Cloneable, Comparable<abort_txns_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_txns_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_txns_argsTupleSchemeFactory()); } private AbortTxnsRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, AbortTxnsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txns_args.class, metaDataMap); } public abort_txns_args() { } public abort_txns_args( AbortTxnsRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on <i>other</i>. */ public abort_txns_args(abort_txns_args other) { if (other.isSetRqst()) { this.rqst = new AbortTxnsRequest(other.rqst); } } public abort_txns_args deepCopy() { return new abort_txns_args(this); } @Override public void clear() { this.rqst = null; } public AbortTxnsRequest getRqst() { return this.rqst; } public void setRqst(AbortTxnsRequest 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((AbortTxnsRequest)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_txns_args) return this.equals((abort_txns_args)that); return false; } public boolean equals(abort_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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(abort_txns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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_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 abort_txns_argsStandardSchemeFactory implements SchemeFactory { public abort_txns_argsStandardScheme getScheme() { return new abort_txns_argsStandardScheme(); } } private static class abort_txns_argsStandardScheme extends StandardScheme<abort_txns_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_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 AbortTxnsRequest(); 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_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 abort_txns_argsTupleSchemeFactory implements SchemeFactory { public abort_txns_argsTupleScheme getScheme() { return new abort_txns_argsTupleScheme(); } } private static class abort_txns_argsTupleScheme extends TupleScheme<abort_txns_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_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, abort_txns_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.rqst = new AbortTxnsRequest(); struct.rqst.read(iprot); struct.setRqstIsSet(true); } } } } public static class abort_txns_result implements org.apache.thrift.TBase<abort_txns_result, abort_txns_result._Fields>, java.io.Serializable, Cloneable, Comparable<abort_txns_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txns_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_txns_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_txns_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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_txns_result.class, metaDataMap); } public abort_txns_result() { } public abort_txns_result( NoSuchTxnException o1) { this(); this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public abort_txns_result(abort_txns_result other) { if (other.isSetO1()) { this.o1 = new NoSuchTxnException(other.o1); } } public abort_txns_result deepCopy() { return new abort_txns_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_txns_result) return this.equals((abort_txns_result)that); return false; } public boolean equals(abort_txns_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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(abort_txns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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_txns_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_txns_resultStandardSchemeFactory implements SchemeFactory { public abort_txns_resultStandardScheme getScheme() { return new abort_txns_resultStandardScheme(); } } private static class abort_txns_resultStandardScheme extends StandardScheme<abort_txns_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_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 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_txns_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_txns_resultTupleSchemeFactory implements SchemeFactory { public abort_txns_resultTupleScheme getScheme() { return new abort_txns_resultTupleScheme(); } } private static class abort_txns_resultTupleScheme extends TupleScheme<abort_txns_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_txns_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_txns_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<commit_txn_args, commit_txn_args._Fields>, java.io.Serializable, Cloneable, Comparable<commit_txn_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(commit_txn_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<commit_txn_args> { 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<commit_txn_args> { @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<commit_txn_result, commit_txn_result._Fields>, java.io.Serializable, Cloneable, Comparable<commit_txn_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(commit_txn_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<commit_txn_result> { 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<commit_txn_result> { @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<lock_args, lock_args._Fields>, java.io.Serializable, Cloneable, Comparable<lock_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(lock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<lock_args> { 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<lock_args> { @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<lock_result, lock_result._Fields>, java.io.Serializable, Cloneable, Comparable<lock_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(lock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<lock_result> { 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<lock_result> { @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<check_lock_args, check_lock_args._Fields>, java.io.Serializable, Cloneable, Comparable<check_lock_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(check_lock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<check_lock_args> { 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<check_lock_args> { @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<check_lock_result, check_lock_result._Fields>, java.io.Serializable, Cloneable, Comparable<check_lock_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(check_lock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<check_lock_result> { 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<check_lock_result> { @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<unlock_args, unlock_args._Fields>, java.io.Serializable, Cloneable, Comparable<unlock_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(unlock_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<unlock_args> { 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<unlock_args> { @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<unlock_result, unlock_result._Fields>, java.io.Serializable, Cloneable, Comparable<unlock_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(unlock_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<unlock_result> { 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<unlock_result> { @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<show_locks_args, show_locks_args._Fields>, java.io.Serializable, Cloneable, Comparable<show_locks_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(show_locks_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<show_locks_args> { 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<show_locks_args> { @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<show_locks_result, show_locks_result._Fields>, java.io.Serializable, Cloneable, Comparable<show_locks_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(show_locks_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<show_locks_result> { 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<show_locks_result> { @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<heartbeat_args, heartbeat_args._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_ids = true && (isSetIds()); list.add(present_ids); if (present_ids) list.add(ids); return list.hashCode(); } @Override public int compareTo(heartbeat_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetIds()).compareTo(other.isSetIds()); if (lastComparison != 0) { return lastComparison; } if (isSetIds()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.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<heartbeat_args> { 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<heartbeat_args> { @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<heartbeat_result, heartbeat_result._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); boolean present_o3 = true && (isSetO3()); list.add(present_o3); if (present_o3) list.add(o3); return list.hashCode(); } @Override public int compareTo(heartbeat_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.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<heartbeat_result> { 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<heartbeat_result> { @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<heartbeat_txn_range_args, heartbeat_txn_range_args._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_txn_range_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_txns = true && (isSetTxns()); list.add(present_txns); if (present_txns) list.add(txns); return list.hashCode(); } @Override public int compareTo(heartbeat_txn_range_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTxns()).compareTo(other.isSetTxns()); if (lastComparison != 0) { return lastComparison; } if (isSetTxns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, other.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<heartbeat_txn_range_args> { 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<heartbeat_txn_range_args> { @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<heartbeat_txn_range_result, heartbeat_txn_range_result._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_txn_range_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(heartbeat_txn_range_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<heartbeat_txn_range_result> { 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<heartbeat_txn_range_result> { @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<compact_args, compact_args._Fields>, java.io.Serializable, Cloneable, Comparable<compact_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(compact_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<compact_args> { 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<compact_args> { @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<compact_result, compact_result._Fields>, java.io.Serializable, Cloneable, Comparable<compact_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); } public compact_result() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(compact_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<compact_result> { 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<compact_result> { @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 compact2_args implements org.apache.thrift.TBase<compact2_args, compact2_args._Fields>, java.io.Serializable, Cloneable, Comparable<compact2_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new compact2_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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(compact2_args.class, metaDataMap); } public compact2_args() { } public compact2_args( CompactionRequest rqst) { this(); this.rqst = rqst; } /** * Performs a deep copy on <i>other</i>. */ public compact2_args(compact2_args other) { if (other.isSetRqst()) { this.rqst = new CompactionRequest(other.rqst); } } public compact2_args deepCopy() { return new compact2_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 compact2_args) return this.equals((compact2_args)that); return false; } public boolean equals(compact2_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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(compact2_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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("compact2_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 compact2_argsStandardSchemeFactory implements SchemeFactory { public compact2_argsStandardScheme getScheme() { return new compact2_argsStandardScheme(); } } private static class compact2_argsStandardScheme extends StandardScheme<compact2_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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, compact2_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 compact2_argsTupleSchemeFactory implements SchemeFactory { public compact2_argsTupleScheme getScheme() { return new compact2_argsTupleScheme(); } } private static class compact2_argsTupleScheme extends TupleScheme<compact2_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, compact2_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, compact2_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 compact2_result implements org.apache.thrift.TBase<compact2_result, compact2_result._Fields>, java.io.Serializable, Cloneable, Comparable<compact2_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); } private CompactionResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); } public compact2_result() { } public compact2_result( CompactionResponse success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public compact2_result(compact2_result other) { if (other.isSetSuccess()) { this.success = new CompactionResponse(other.success); } } public compact2_result deepCopy() { return new compact2_result(this); } @Override public void clear() { this.success = null; } public CompactionResponse getSuccess() { return this.success; } public void setSuccess(CompactionResponse 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((CompactionResponse)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 compact2_result) return this.equals((compact2_result)that); return false; } public boolean equals(compact2_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(compact2_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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("compact2_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 compact2_resultStandardSchemeFactory implements SchemeFactory { public compact2_resultStandardScheme getScheme() { return new compact2_resultStandardScheme(); } } private static class compact2_resultStandardScheme extends StandardScheme<compact2_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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 CompactionResponse(); 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, compact2_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 compact2_resultTupleSchemeFactory implements SchemeFactory { public compact2_resultTupleScheme getScheme() { return new compact2_resultTupleScheme(); } } private static class compact2_resultTupleScheme extends TupleScheme<compact2_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, compact2_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, compact2_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new CompactionResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class show_compact_args implements org.apache.thrift.TBase<show_compact_args, show_compact_args._Fields>, java.io.Serializable, Cloneable, Comparable<show_compact_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(show_compact_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<show_compact_args> { 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<show_compact_args> { @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<show_compact_result, show_compact_result._Fields>, java.io.Serializable, Cloneable, Comparable<show_compact_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(show_compact_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<show_compact_result> { 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<show_compact_result> { @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<add_dynamic_partitions_args, add_dynamic_partitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_dynamic_partitions_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(add_dynamic_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<add_dynamic_partitions_args> { 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<add_dynamic_partitions_args> { @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<add_dynamic_partitions_result, add_dynamic_partitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<add_dynamic_partitions_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); boolean present_o2 = true && (isSetO2()); list.add(present_o2); if (present_o2) list.add(o2); return list.hashCode(); } @Override public int compareTo(add_dynamic_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.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<add_dynamic_partitions_result> { 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<add_dynamic_partitions_result> { @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<get_next_notification_args, get_next_notification_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_next_notification_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(get_next_notification_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<get_next_notification_args> { 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<get_next_notification_args> { @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<get_next_notification_result, get_next_notification_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_next_notification_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_next_notification_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<get_next_notification_result> { 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<get_next_notification_result> { @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<get_current_notificationEventId_args, get_current_notificationEventId_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_current_notificationEventId_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_args.class, metaDataMap); } public get_current_notificationEventId_args() { } /** * Performs a deep copy on <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_current_notificationEventId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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<get_current_notificationEventId_args> { 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<get_current_notificationEventId_args> { @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<get_current_notificationEventId_result, get_current_notificationEventId_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_current_notificationEventId_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_current_notificationEventId_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<get_current_notificationEventId_result> { 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<get_current_notificationEventId_result> { @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<fire_listener_event_args, fire_listener_event_args._Fields>, java.io.Serializable, Cloneable, Comparable<fire_listener_event_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_rqst = true && (isSetRqst()); list.add(present_rqst); if (present_rqst) list.add(rqst); return list.hashCode(); } @Override public int compareTo(fire_listener_event_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); if (lastComparison != 0) { return lastComparison; } if (isSetRqst()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.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<fire_listener_event_args> { 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<fire_listener_event_args> { @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<fire_listener_event_result, fire_listener_event_result._Fields>, java.io.Serializable, Cloneable, Comparable<fire_listener_event_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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 <i>other</i>. */ 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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(fire_listener_event_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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<fire_listener_event_result> { 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<fire_listener_event_result> { @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); } } } } public static class flushCache_args implements org.apache.thrift.TBase<flushCache_args, flushCache_args._Fields>, java.io.Serializable, Cloneable, Comparable<flushCache_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flushCache_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new flushCache_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_args.class, metaDataMap); } public flushCache_args() { } /** * Performs a deep copy on <i>other</i>. */ public flushCache_args(flushCache_args other) { } public flushCache_args deepCopy() { return new flushCache_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 flushCache_args) return this.equals((flushCache_args)that); return false; } public boolean equals(flushCache_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(flushCache_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flushCache_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 flushCache_argsStandardSchemeFactory implements SchemeFactory { public flushCache_argsStandardScheme getScheme() { return new flushCache_argsStandardScheme(); } } private static class flushCache_argsStandardScheme extends StandardScheme<flushCache_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flushCache_argsTupleSchemeFactory implements SchemeFactory { public flushCache_argsTupleScheme getScheme() { return new flushCache_argsTupleScheme(); } } private static class flushCache_argsTupleScheme extends TupleScheme<flushCache_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class flushCache_result implements org.apache.thrift.TBase<flushCache_result, flushCache_result._Fields>, java.io.Serializable, Cloneable, Comparable<flushCache_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flushCache_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new flushCache_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_result.class, metaDataMap); } public flushCache_result() { } /** * Performs a deep copy on <i>other</i>. */ public flushCache_result(flushCache_result other) { } public flushCache_result deepCopy() { return new flushCache_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 flushCache_result) return this.equals((flushCache_result)that); return false; } public boolean equals(flushCache_result that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(flushCache_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flushCache_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 flushCache_resultStandardSchemeFactory implements SchemeFactory { public flushCache_resultStandardScheme getScheme() { return new flushCache_resultStandardScheme(); } } private static class flushCache_resultStandardScheme extends StandardScheme<flushCache_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flushCache_resultTupleSchemeFactory implements SchemeFactory { public flushCache_resultTupleScheme getScheme() { return new flushCache_resultTupleScheme(); } } private static class flushCache_resultTupleScheme extends TupleScheme<flushCache_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_file_metadata_by_expr_args implements org.apache.thrift.TBase<get_file_metadata_by_expr_args, get_file_metadata_by_expr_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_file_metadata_by_expr_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_file_metadata_by_expr_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_file_metadata_by_expr_argsTupleSchemeFactory()); } private GetFileMetadataByExprRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, GetFileMetadataByExprRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_args.class, metaDataMap); } public get_file_metadata_by_expr_args() { } public get_file_metadata_by_expr_args( GetFileMetadataByExprRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public get_file_metadata_by_expr_args(get_file_metadata_by_expr_args other) { if (other.isSetReq()) { this.req = new GetFileMetadataByExprRequest(other.req); } } public get_file_metadata_by_expr_args deepCopy() { return new get_file_metadata_by_expr_args(this); } @Override public void clear() { this.req = null; } public GetFileMetadataByExprRequest getReq() { return this.req; } public void setReq(GetFileMetadataByExprRequest 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((GetFileMetadataByExprRequest)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_file_metadata_by_expr_args) return this.equals((get_file_metadata_by_expr_args)that); return false; } public boolean equals(get_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(get_file_metadata_by_expr_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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_file_metadata_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_file_metadata_by_expr_argsStandardSchemeFactory implements SchemeFactory { public get_file_metadata_by_expr_argsStandardScheme getScheme() { return new get_file_metadata_by_expr_argsStandardScheme(); } } private static class get_file_metadata_by_expr_argsStandardScheme extends StandardScheme<get_file_metadata_by_expr_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataByExprRequest(); 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_file_metadata_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_file_metadata_by_expr_argsTupleSchemeFactory implements SchemeFactory { public get_file_metadata_by_expr_argsTupleScheme getScheme() { return new get_file_metadata_by_expr_argsTupleScheme(); } } private static class get_file_metadata_by_expr_argsTupleScheme extends TupleScheme<get_file_metadata_by_expr_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_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_file_metadata_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 GetFileMetadataByExprRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class get_file_metadata_by_expr_result implements org.apache.thrift.TBase<get_file_metadata_by_expr_result, get_file_metadata_by_expr_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_file_metadata_by_expr_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_file_metadata_by_expr_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_file_metadata_by_expr_resultTupleSchemeFactory()); } private GetFileMetadataByExprResult success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataByExprResult.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_result.class, metaDataMap); } public get_file_metadata_by_expr_result() { } public get_file_metadata_by_expr_result( GetFileMetadataByExprResult success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_file_metadata_by_expr_result(get_file_metadata_by_expr_result other) { if (other.isSetSuccess()) { this.success = new GetFileMetadataByExprResult(other.success); } } public get_file_metadata_by_expr_result deepCopy() { return new get_file_metadata_by_expr_result(this); } @Override public void clear() { this.success = null; } public GetFileMetadataByExprResult getSuccess() { return this.success; } public void setSuccess(GetFileMetadataByExprResult 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((GetFileMetadataByExprResult)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_file_metadata_by_expr_result) return this.equals((get_file_metadata_by_expr_result)that); return false; } public boolean equals(get_file_metadata_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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_file_metadata_by_expr_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_file_metadata_by_expr_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_file_metadata_by_expr_resultStandardSchemeFactory implements SchemeFactory { public get_file_metadata_by_expr_resultStandardScheme getScheme() { return new get_file_metadata_by_expr_resultStandardScheme(); } } private static class get_file_metadata_by_expr_resultStandardScheme extends StandardScheme<get_file_metadata_by_expr_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataByExprResult(); 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_file_metadata_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(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_file_metadata_by_expr_resultTupleSchemeFactory implements SchemeFactory { public get_file_metadata_by_expr_resultTupleScheme getScheme() { return new get_file_metadata_by_expr_resultTupleScheme(); } } private static class get_file_metadata_by_expr_resultTupleScheme extends TupleScheme<get_file_metadata_by_expr_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_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_file_metadata_by_expr_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new GetFileMetadataByExprResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class get_file_metadata_args implements org.apache.thrift.TBase<get_file_metadata_args, get_file_metadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_file_metadata_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_file_metadata_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_file_metadata_argsTupleSchemeFactory()); } private GetFileMetadataRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, GetFileMetadataRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_args.class, metaDataMap); } public get_file_metadata_args() { } public get_file_metadata_args( GetFileMetadataRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public get_file_metadata_args(get_file_metadata_args other) { if (other.isSetReq()) { this.req = new GetFileMetadataRequest(other.req); } } public get_file_metadata_args deepCopy() { return new get_file_metadata_args(this); } @Override public void clear() { this.req = null; } public GetFileMetadataRequest getReq() { return this.req; } public void setReq(GetFileMetadataRequest 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((GetFileMetadataRequest)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_file_metadata_args) return this.equals((get_file_metadata_args)that); return false; } public boolean equals(get_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(get_file_metadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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_file_metadata_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_file_metadata_argsStandardSchemeFactory implements SchemeFactory { public get_file_metadata_argsStandardScheme getScheme() { return new get_file_metadata_argsStandardScheme(); } } private static class get_file_metadata_argsStandardScheme extends StandardScheme<get_file_metadata_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataRequest(); 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_file_metadata_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_file_metadata_argsTupleSchemeFactory implements SchemeFactory { public get_file_metadata_argsTupleScheme getScheme() { return new get_file_metadata_argsTupleScheme(); } } private static class get_file_metadata_argsTupleScheme extends TupleScheme<get_file_metadata_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_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_file_metadata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new GetFileMetadataRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class get_file_metadata_result implements org.apache.thrift.TBase<get_file_metadata_result, get_file_metadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_file_metadata_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_file_metadata_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_file_metadata_resultTupleSchemeFactory()); } private GetFileMetadataResult success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataResult.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_result.class, metaDataMap); } public get_file_metadata_result() { } public get_file_metadata_result( GetFileMetadataResult success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_file_metadata_result(get_file_metadata_result other) { if (other.isSetSuccess()) { this.success = new GetFileMetadataResult(other.success); } } public get_file_metadata_result deepCopy() { return new get_file_metadata_result(this); } @Override public void clear() { this.success = null; } public GetFileMetadataResult getSuccess() { return this.success; } public void setSuccess(GetFileMetadataResult 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((GetFileMetadataResult)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_file_metadata_result) return this.equals((get_file_metadata_result)that); return false; } public boolean equals(get_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(get_file_metadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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_file_metadata_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_file_metadata_resultStandardSchemeFactory implements SchemeFactory { public get_file_metadata_resultStandardScheme getScheme() { return new get_file_metadata_resultStandardScheme(); } } private static class get_file_metadata_resultStandardScheme extends StandardScheme<get_file_metadata_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataResult(); 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_file_metadata_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_file_metadata_resultTupleSchemeFactory implements SchemeFactory { public get_file_metadata_resultTupleScheme getScheme() { return new get_file_metadata_resultTupleScheme(); } } private static class get_file_metadata_resultTupleScheme extends TupleScheme<get_file_metadata_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_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_file_metadata_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new GetFileMetadataResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class put_file_metadata_args implements org.apache.thrift.TBase<put_file_metadata_args, put_file_metadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<put_file_metadata_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new put_file_metadata_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new put_file_metadata_argsTupleSchemeFactory()); } private PutFileMetadataRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, PutFileMetadataRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_args.class, metaDataMap); } public put_file_metadata_args() { } public put_file_metadata_args( PutFileMetadataRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public put_file_metadata_args(put_file_metadata_args other) { if (other.isSetReq()) { this.req = new PutFileMetadataRequest(other.req); } } public put_file_metadata_args deepCopy() { return new put_file_metadata_args(this); } @Override public void clear() { this.req = null; } public PutFileMetadataRequest getReq() { return this.req; } public void setReq(PutFileMetadataRequest 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((PutFileMetadataRequest)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 put_file_metadata_args) return this.equals((put_file_metadata_args)that); return false; } public boolean equals(put_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(put_file_metadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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("put_file_metadata_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 put_file_metadata_argsStandardSchemeFactory implements SchemeFactory { public put_file_metadata_argsStandardScheme getScheme() { return new put_file_metadata_argsStandardScheme(); } } private static class put_file_metadata_argsStandardScheme extends StandardScheme<put_file_metadata_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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 PutFileMetadataRequest(); 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, put_file_metadata_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 put_file_metadata_argsTupleSchemeFactory implements SchemeFactory { public put_file_metadata_argsTupleScheme getScheme() { return new put_file_metadata_argsTupleScheme(); } } private static class put_file_metadata_argsTupleScheme extends TupleScheme<put_file_metadata_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_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, put_file_metadata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new PutFileMetadataRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class put_file_metadata_result implements org.apache.thrift.TBase<put_file_metadata_result, put_file_metadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<put_file_metadata_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new put_file_metadata_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new put_file_metadata_resultTupleSchemeFactory()); } private PutFileMetadataResult success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PutFileMetadataResult.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_result.class, metaDataMap); } public put_file_metadata_result() { } public put_file_metadata_result( PutFileMetadataResult success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public put_file_metadata_result(put_file_metadata_result other) { if (other.isSetSuccess()) { this.success = new PutFileMetadataResult(other.success); } } public put_file_metadata_result deepCopy() { return new put_file_metadata_result(this); } @Override public void clear() { this.success = null; } public PutFileMetadataResult getSuccess() { return this.success; } public void setSuccess(PutFileMetadataResult 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((PutFileMetadataResult)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 put_file_metadata_result) return this.equals((put_file_metadata_result)that); return false; } public boolean equals(put_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(put_file_metadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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("put_file_metadata_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 put_file_metadata_resultStandardSchemeFactory implements SchemeFactory { public put_file_metadata_resultStandardScheme getScheme() { return new put_file_metadata_resultStandardScheme(); } } private static class put_file_metadata_resultStandardScheme extends StandardScheme<put_file_metadata_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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 PutFileMetadataResult(); 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, put_file_metadata_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 put_file_metadata_resultTupleSchemeFactory implements SchemeFactory { public put_file_metadata_resultTupleScheme getScheme() { return new put_file_metadata_resultTupleScheme(); } } private static class put_file_metadata_resultTupleScheme extends TupleScheme<put_file_metadata_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_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, put_file_metadata_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new PutFileMetadataResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class clear_file_metadata_args implements org.apache.thrift.TBase<clear_file_metadata_args, clear_file_metadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<clear_file_metadata_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new clear_file_metadata_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new clear_file_metadata_argsTupleSchemeFactory()); } private ClearFileMetadataRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, ClearFileMetadataRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_args.class, metaDataMap); } public clear_file_metadata_args() { } public clear_file_metadata_args( ClearFileMetadataRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public clear_file_metadata_args(clear_file_metadata_args other) { if (other.isSetReq()) { this.req = new ClearFileMetadataRequest(other.req); } } public clear_file_metadata_args deepCopy() { return new clear_file_metadata_args(this); } @Override public void clear() { this.req = null; } public ClearFileMetadataRequest getReq() { return this.req; } public void setReq(ClearFileMetadataRequest 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((ClearFileMetadataRequest)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 clear_file_metadata_args) return this.equals((clear_file_metadata_args)that); return false; } public boolean equals(clear_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(clear_file_metadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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("clear_file_metadata_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 clear_file_metadata_argsStandardSchemeFactory implements SchemeFactory { public clear_file_metadata_argsStandardScheme getScheme() { return new clear_file_metadata_argsStandardScheme(); } } private static class clear_file_metadata_argsStandardScheme extends StandardScheme<clear_file_metadata_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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 ClearFileMetadataRequest(); 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, clear_file_metadata_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 clear_file_metadata_argsTupleSchemeFactory implements SchemeFactory { public clear_file_metadata_argsTupleScheme getScheme() { return new clear_file_metadata_argsTupleScheme(); } } private static class clear_file_metadata_argsTupleScheme extends TupleScheme<clear_file_metadata_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_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, clear_file_metadata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new ClearFileMetadataRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class clear_file_metadata_result implements org.apache.thrift.TBase<clear_file_metadata_result, clear_file_metadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<clear_file_metadata_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new clear_file_metadata_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new clear_file_metadata_resultTupleSchemeFactory()); } private ClearFileMetadataResult success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClearFileMetadataResult.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_result.class, metaDataMap); } public clear_file_metadata_result() { } public clear_file_metadata_result( ClearFileMetadataResult success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public clear_file_metadata_result(clear_file_metadata_result other) { if (other.isSetSuccess()) { this.success = new ClearFileMetadataResult(other.success); } } public clear_file_metadata_result deepCopy() { return new clear_file_metadata_result(this); } @Override public void clear() { this.success = null; } public ClearFileMetadataResult getSuccess() { return this.success; } public void setSuccess(ClearFileMetadataResult 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((ClearFileMetadataResult)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 clear_file_metadata_result) return this.equals((clear_file_metadata_result)that); return false; } public boolean equals(clear_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(clear_file_metadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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("clear_file_metadata_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 clear_file_metadata_resultStandardSchemeFactory implements SchemeFactory { public clear_file_metadata_resultStandardScheme getScheme() { return new clear_file_metadata_resultStandardScheme(); } } private static class clear_file_metadata_resultStandardScheme extends StandardScheme<clear_file_metadata_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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 ClearFileMetadataResult(); 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, clear_file_metadata_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 clear_file_metadata_resultTupleSchemeFactory implements SchemeFactory { public clear_file_metadata_resultTupleScheme getScheme() { return new clear_file_metadata_resultTupleScheme(); } } private static class clear_file_metadata_resultTupleScheme extends TupleScheme<clear_file_metadata_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_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, clear_file_metadata_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new ClearFileMetadataResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class cache_file_metadata_args implements org.apache.thrift.TBase<cache_file_metadata_args, cache_file_metadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<cache_file_metadata_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cache_file_metadata_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new cache_file_metadata_argsTupleSchemeFactory()); } private CacheFileMetadataRequest 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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // 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, CacheFileMetadataRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_args.class, metaDataMap); } public cache_file_metadata_args() { } public cache_file_metadata_args( CacheFileMetadataRequest req) { this(); this.req = req; } /** * Performs a deep copy on <i>other</i>. */ public cache_file_metadata_args(cache_file_metadata_args other) { if (other.isSetReq()) { this.req = new CacheFileMetadataRequest(other.req); } } public cache_file_metadata_args deepCopy() { return new cache_file_metadata_args(this); } @Override public void clear() { this.req = null; } public CacheFileMetadataRequest getReq() { return this.req; } public void setReq(CacheFileMetadataRequest 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((CacheFileMetadataRequest)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 cache_file_metadata_args) return this.equals((cache_file_metadata_args)that); return false; } public boolean equals(cache_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_req = true && (isSetReq()); list.add(present_req); if (present_req) list.add(req); return list.hashCode(); } @Override public int compareTo(cache_file_metadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.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("cache_file_metadata_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 cache_file_metadata_argsStandardSchemeFactory implements SchemeFactory { public cache_file_metadata_argsStandardScheme getScheme() { return new cache_file_metadata_argsStandardScheme(); } } private static class cache_file_metadata_argsStandardScheme extends StandardScheme<cache_file_metadata_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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 CacheFileMetadataRequest(); 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, cache_file_metadata_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 cache_file_metadata_argsTupleSchemeFactory implements SchemeFactory { public cache_file_metadata_argsTupleScheme getScheme() { return new cache_file_metadata_argsTupleScheme(); } } private static class cache_file_metadata_argsTupleScheme extends TupleScheme<cache_file_metadata_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_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, cache_file_metadata_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new CacheFileMetadataRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class cache_file_metadata_result implements org.apache.thrift.TBase<cache_file_metadata_result, cache_file_metadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<cache_file_metadata_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cache_file_metadata_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new cache_file_metadata_resultTupleSchemeFactory()); } private CacheFileMetadataResult success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheFileMetadataResult.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_result.class, metaDataMap); } public cache_file_metadata_result() { } public cache_file_metadata_result( CacheFileMetadataResult success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public cache_file_metadata_result(cache_file_metadata_result other) { if (other.isSetSuccess()) { this.success = new CacheFileMetadataResult(other.success); } } public cache_file_metadata_result deepCopy() { return new cache_file_metadata_result(this); } @Override public void clear() { this.success = null; } public CacheFileMetadataResult getSuccess() { return this.success; } public void setSuccess(CacheFileMetadataResult 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((CacheFileMetadataResult)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 cache_file_metadata_result) return this.equals((cache_file_metadata_result)that); return false; } public boolean equals(cache_file_metadata_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(cache_file_metadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.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("cache_file_metadata_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 cache_file_metadata_resultStandardSchemeFactory implements SchemeFactory { public cache_file_metadata_resultStandardScheme getScheme() { return new cache_file_metadata_resultStandardScheme(); } } private static class cache_file_metadata_resultStandardScheme extends StandardScheme<cache_file_metadata_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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 CacheFileMetadataResult(); 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, cache_file_metadata_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 cache_file_metadata_resultTupleSchemeFactory implements SchemeFactory { public cache_file_metadata_resultTupleScheme getScheme() { return new cache_file_metadata_resultTupleScheme(); } } private static class cache_file_metadata_resultTupleScheme extends TupleScheme<cache_file_metadata_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_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, cache_file_metadata_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new CacheFileMetadataResult(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } } public static class get_metastore_db_uuid_args implements org.apache.thrift.TBase<get_metastore_db_uuid_args, get_metastore_db_uuid_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_metastore_db_uuid_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_metastore_db_uuid_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_metastore_db_uuid_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_metastore_db_uuid_args.class, metaDataMap); } public get_metastore_db_uuid_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_metastore_db_uuid_args(get_metastore_db_uuid_args other) { } public get_metastore_db_uuid_args deepCopy() { return new get_metastore_db_uuid_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_metastore_db_uuid_args) return this.equals((get_metastore_db_uuid_args)that); return false; } public boolean equals(get_metastore_db_uuid_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(get_metastore_db_uuid_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.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_metastore_db_uuid_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_metastore_db_uuid_argsStandardSchemeFactory implements SchemeFactory { public get_metastore_db_uuid_argsStandardScheme getScheme() { return new get_metastore_db_uuid_argsStandardScheme(); } } private static class get_metastore_db_uuid_argsStandardScheme extends StandardScheme<get_metastore_db_uuid_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_metastore_db_uuid_argsTupleSchemeFactory implements SchemeFactory { public get_metastore_db_uuid_argsTupleScheme getScheme() { return new get_metastore_db_uuid_argsTupleScheme(); } } private static class get_metastore_db_uuid_argsTupleScheme extends TupleScheme<get_metastore_db_uuid_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_metastore_db_uuid_result implements org.apache.thrift.TBase<get_metastore_db_uuid_result, get_metastore_db_uuid_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_metastore_db_uuid_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_metastore_db_uuid_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_metastore_db_uuid_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<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // 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_metastore_db_uuid_result.class, metaDataMap); } public get_metastore_db_uuid_result() { } public get_metastore_db_uuid_result( String success, MetaException o1) { this(); this.success = success; this.o1 = o1; } /** * Performs a deep copy on <i>other</i>. */ public get_metastore_db_uuid_result(get_metastore_db_uuid_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_metastore_db_uuid_result deepCopy() { return new get_metastore_db_uuid_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_metastore_db_uuid_result) return this.equals((get_metastore_db_uuid_result)that); return false; } public boolean equals(get_metastore_db_uuid_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() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_o1 = true && (isSetO1()); list.add(present_o1); if (present_o1) list.add(o1); return list.hashCode(); } @Override public int compareTo(get_metastore_db_uuid_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.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_metastore_db_uuid_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_metastore_db_uuid_resultStandardSchemeFactory implements SchemeFactory { public get_metastore_db_uuid_resultStandardScheme getScheme() { return new get_metastore_db_uuid_resultStandardScheme(); } } private static class get_metastore_db_uuid_resultStandardScheme extends StandardScheme<get_metastore_db_uuid_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_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_metastore_db_uuid_resultTupleSchemeFactory implements SchemeFactory { public get_metastore_db_uuid_resultTupleScheme getScheme() { return new get_metastore_db_uuid_resultTupleScheme(); } } private static class get_metastore_db_uuid_resultTupleScheme extends TupleScheme<get_metastore_db_uuid_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_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_metastore_db_uuid_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); } } } } }