/** * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hive.metastore.api; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ThriftHiveMetastore { /** * This interface is live. */ public interface Iface extends com.facebook.fb303.FacebookService.Iface { public 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_schema(String db_name, String table_name) 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 drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, 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_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 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 Partition add_partition(Partition new_part) 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 Partition append_partition(String db_name, String tbl_name, List<String> part_vals) 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 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_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) 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 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<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<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 rename_partition(String db_name, String tbl_name, List<String> part_vals, Partition new_part) throws InvalidOperationException, 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 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 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 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 interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.create_database_call> resultHandler) throws org.apache.thrift.TException; public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_database_call> resultHandler) throws org.apache.thrift.TException; public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.drop_database_call> resultHandler) throws org.apache.thrift.TException; public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_databases_call> resultHandler) throws org.apache.thrift.TException; public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_all_databases_call> resultHandler) throws org.apache.thrift.TException; public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.alter_database_call> resultHandler) throws org.apache.thrift.TException; public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_type_call> resultHandler) throws org.apache.thrift.TException; public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.create_type_call> resultHandler) throws org.apache.thrift.TException; public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.drop_type_call> resultHandler) throws org.apache.thrift.TException; public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_type_all_call> resultHandler) throws org.apache.thrift.TException; public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_fields_call> resultHandler) throws org.apache.thrift.TException; public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_schema_call> resultHandler) throws org.apache.thrift.TException; public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.create_table_call> resultHandler) throws org.apache.thrift.TException; public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.drop_table_call> resultHandler) throws org.apache.thrift.TException; public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_tables_call> resultHandler) throws org.apache.thrift.TException; public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_all_tables_call> resultHandler) throws org.apache.thrift.TException; public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_table_call> resultHandler) throws org.apache.thrift.TException; public void get_table_objects_by_name(String dbname, List<String> tbl_names, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_table_objects_by_name_call> 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<AsyncClient.get_table_names_by_filter_call> resultHandler) throws org.apache.thrift.TException; public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.alter_table_call> resultHandler) throws org.apache.thrift.TException; public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.add_partition_call> resultHandler) throws org.apache.thrift.TException; public void add_partitions(List<Partition> new_parts, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.add_partitions_call> 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<AsyncClient.append_partition_call> 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<AsyncClient.append_partition_by_name_call> 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<AsyncClient.drop_partition_call> 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<AsyncClient.drop_partition_by_name_call> 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<AsyncClient.get_partition_call> 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<AsyncClient.get_partition_with_auth_call> 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<AsyncClient.get_partition_by_name_call> resultHandler) throws org.apache.thrift.TException; public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_partitions_call> 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<AsyncClient.get_partitions_with_auth_call> 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<AsyncClient.get_partition_names_call> 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<AsyncClient.get_partitions_ps_call> 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<AsyncClient.get_partitions_ps_with_auth_call> 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<AsyncClient.get_partition_names_ps_call> 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<AsyncClient.get_partitions_by_filter_call> 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<AsyncClient.get_partitions_by_names_call> resultHandler) throws org.apache.thrift.TException; public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.alter_partition_call> 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<AsyncClient.rename_partition_call> resultHandler) throws org.apache.thrift.TException; public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_config_value_call> resultHandler) throws org.apache.thrift.TException; public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.partition_name_to_vals_call> resultHandler) throws org.apache.thrift.TException; public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.partition_name_to_spec_call> 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<AsyncClient.markPartitionForEvent_call> 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<AsyncClient.isPartitionMarkedForEvent_call> resultHandler) throws org.apache.thrift.TException; public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.add_index_call> 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<AsyncClient.alter_index_call> 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<AsyncClient.drop_index_by_name_call> 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<AsyncClient.get_index_by_name_call> resultHandler) throws org.apache.thrift.TException; public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_indexes_call> 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<AsyncClient.get_index_names_call> resultHandler) throws org.apache.thrift.TException; public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.create_role_call> resultHandler) throws org.apache.thrift.TException; public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.drop_role_call> resultHandler) throws org.apache.thrift.TException; public void get_role_names(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_role_names_call> 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<AsyncClient.grant_role_call> resultHandler) throws org.apache.thrift.TException; public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.revoke_role_call> resultHandler) throws org.apache.thrift.TException; public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.list_roles_call> 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<AsyncClient.get_privilege_set_call> resultHandler) throws org.apache.thrift.TException; public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.list_privileges_call> resultHandler) throws org.apache.thrift.TException; public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.grant_privileges_call> resultHandler) throws org.apache.thrift.TException; public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.revoke_privileges_call> resultHandler) throws org.apache.thrift.TException; public void set_ugi(String user_name, List<String> group_names, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.set_ugi_call> resultHandler) throws org.apache.thrift.TException; public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_delegation_token_call> resultHandler) throws org.apache.thrift.TException; public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.renew_delegation_token_call> resultHandler) throws org.apache.thrift.TException; public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.cancel_delegation_token_call> 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 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_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 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 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 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_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 MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { send_get_table_objects_by_name(dbname, tbl_names); return recv_get_table_objects_by_name(); } public void send_get_table_objects_by_name(String dbname, List<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 MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); receiveBase(result, "get_table_objects_by_name"); if (result.isSetSuccess()) { return result.success; } if (result.o1 != null) { throw result.o1; } if (result.o2 != null) { throw result.o2; } if (result.o3 != null) { throw result.o3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } public List<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 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 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 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 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 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_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 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 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<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<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 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 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 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 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 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 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 create_database(Database database, org.apache.thrift.async.AsyncMethodCallback<create_database_call> 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<create_database_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_database_call> 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<get_database_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("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<drop_database_call> 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<drop_database_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.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<get_databases_call> 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<get_databases_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_all_databases_call> 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<get_all_databases_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("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<alter_database_call> 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<alter_database_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_type_call> 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<get_type_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("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<create_type_call> 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<create_type_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<drop_type_call> 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<drop_type_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_type_all_call> 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<get_type_all_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("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<get_fields_call> 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<get_fields_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback<get_schema_call> 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<get_schema_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback<create_table_call> 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<create_table_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback<drop_table_call> 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<drop_table_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback<get_tables_call> 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<get_tables_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback<get_all_tables_call> 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<get_all_tables_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_table_call> 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<get_table_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_table_objects_by_name_call> 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<get_table_objects_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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 MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_table_objects_by_name(); } } public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback<get_table_names_by_filter_call> 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<get_table_names_by_filter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<alter_table_call> 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<alter_table_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback<add_partition_call> 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<add_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_partitions(List<Partition> new_parts, org.apache.thrift.async.AsyncMethodCallback<add_partitions_call> 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<add_partitions_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 append_partition(String db_name, String tbl_name, List<String> part_vals, org.apache.thrift.async.AsyncMethodCallback<append_partition_call> 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<append_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback<append_partition_by_name_call> 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<append_partition_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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 drop_partition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback<drop_partition_call> 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<drop_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback<drop_partition_by_name_call> 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<drop_partition_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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 get_partition(String db_name, String tbl_name, List<String> part_vals, org.apache.thrift.async.AsyncMethodCallback<get_partition_call> 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<get_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 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<get_partition_with_auth_call> 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<get_partition_with_auth_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partition_by_name_call> 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<get_partition_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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<get_partitions_call> 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<get_partitions_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partitions_with_auth_call> 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<get_partitions_with_auth_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback<get_partition_names_call> 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<get_partition_names_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partitions_ps_call> 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<get_partitions_ps_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partitions_ps_with_auth_call> 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<get_partitions_ps_with_auth_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partition_names_ps_call> 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<get_partition_names_ps_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_partitions_by_filter_call> 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<get_partitions_by_filter_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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_partitions_by_names(String db_name, String tbl_name, List<String> names, org.apache.thrift.async.AsyncMethodCallback<get_partitions_by_names_call> 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<get_partitions_by_names_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<alter_partition_call> 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<alter_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 rename_partition(String db_name, String tbl_name, List<String> part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback<rename_partition_call> 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<rename_partition_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback<get_config_value_call> 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<get_config_value_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.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<partition_name_to_vals_call> 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<partition_name_to_vals_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<partition_name_to_spec_call> 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<partition_name_to_spec_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<markPartitionForEvent_call> 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<markPartitionForEvent_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<isPartitionMarkedForEvent_call> 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<isPartitionMarkedForEvent_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<add_index_call> 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<add_index_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<alter_index_call> 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<alter_index_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<drop_index_by_name_call> 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<drop_index_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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<get_index_by_name_call> 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<get_index_by_name_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); 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<get_indexes_call> 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<get_indexes_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_index_names_call> 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<get_index_names_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 create_role(Role role, org.apache.thrift.async.AsyncMethodCallback<create_role_call> 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<create_role_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<drop_role_call> 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<drop_role_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<get_role_names_call> 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<get_role_names_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("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<grant_role_call> 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<grant_role_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<revoke_role_call> 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<revoke_role_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<list_roles_call> 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<list_roles_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names, org.apache.thrift.async.AsyncMethodCallback<get_privilege_set_call> 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<get_privilege_set_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<list_privileges_call> 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<list_privileges_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<grant_privileges_call> 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<grant_privileges_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<revoke_privileges_call> 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<revoke_privileges_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 set_ugi(String user_name, List<String> group_names, org.apache.thrift.async.AsyncMethodCallback<set_ugi_call> 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<set_ugi_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.user_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<get_delegation_token_call> 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<get_delegation_token_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<renew_delegation_token_call> 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<renew_delegation_token_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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<cancel_delegation_token_call> 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<cancel_delegation_token_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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 static class Processor<I extends Iface> extends com.facebook.fb303.FacebookService.Processor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<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("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_schema", new get_schema()); processMap.put("create_table", new create_table()); processMap.put("drop_table", new drop_table()); processMap.put("get_tables", new get_tables()); processMap.put("get_all_tables", new get_all_tables()); processMap.put("get_table", new get_table()); processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); processMap.put("alter_table", new alter_table()); processMap.put("add_partition", new add_partition()); processMap.put("add_partitions", new add_partitions()); processMap.put("append_partition", new append_partition()); processMap.put("append_partition_by_name", new append_partition_by_name()); processMap.put("drop_partition", new drop_partition()); processMap.put("drop_partition_by_name", new drop_partition_by_name()); processMap.put("get_partition", new get_partition()); processMap.put("get_partition_with_auth", new get_partition_with_auth()); processMap.put("get_partition_by_name", new get_partition_by_name()); processMap.put("get_partitions", new get_partitions()); processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); processMap.put("get_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_partitions_by_names", new get_partitions_by_names()); processMap.put("alter_partition", new alter_partition()); processMap.put("rename_partition", new rename_partition()); 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("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("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("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()); return processMap; } private static class create_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_database_args> { public create_database() { super("create_database"); } protected create_database_args getEmptyArgsInstance() { return new create_database_args(); } protected 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; } } private static class get_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_database_args> { public get_database() { super("get_database"); } protected get_database_args getEmptyArgsInstance() { return new get_database_args(); } protected 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; } } private static class drop_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_database_args> { public drop_database() { super("drop_database"); } protected drop_database_args getEmptyArgsInstance() { return new drop_database_args(); } protected 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; } } private static class get_databases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_databases_args> { public get_databases() { super("get_databases"); } protected get_databases_args getEmptyArgsInstance() { return new get_databases_args(); } protected 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; } } private 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"); } protected get_all_databases_args getEmptyArgsInstance() { return new get_all_databases_args(); } protected 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; } } private static class alter_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_database_args> { public alter_database() { super("alter_database"); } protected alter_database_args getEmptyArgsInstance() { return new alter_database_args(); } protected 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; } } private static class get_type<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_type_args> { public get_type() { super("get_type"); } protected get_type_args getEmptyArgsInstance() { return new get_type_args(); } protected 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; } } private static class create_type<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_type_args> { public create_type() { super("create_type"); } protected create_type_args getEmptyArgsInstance() { return new create_type_args(); } protected 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; } } private static class drop_type<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_type_args> { public drop_type() { super("drop_type"); } protected drop_type_args getEmptyArgsInstance() { return new drop_type_args(); } protected 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; } } private 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"); } protected get_type_all_args getEmptyArgsInstance() { return new get_type_all_args(); } protected 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; } } private static class get_fields<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_fields_args> { public get_fields() { super("get_fields"); } protected get_fields_args getEmptyArgsInstance() { return new get_fields_args(); } protected 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; } } private static class get_schema<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_schema_args> { public get_schema() { super("get_schema"); } protected get_schema_args getEmptyArgsInstance() { return new get_schema_args(); } protected 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; } } private static class create_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_args> { public create_table() { super("create_table"); } protected create_table_args getEmptyArgsInstance() { return new create_table_args(); } protected 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; } } private static class drop_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_table_args> { public drop_table() { super("drop_table"); } protected drop_table_args getEmptyArgsInstance() { return new drop_table_args(); } protected 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; } } private static class get_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_args> { public get_tables() { super("get_tables"); } protected get_tables_args getEmptyArgsInstance() { return new get_tables_args(); } protected 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; } } private 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"); } protected get_all_tables_args getEmptyArgsInstance() { return new get_all_tables_args(); } protected 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; } } private static class get_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_args> { public get_table() { super("get_table"); } protected get_table_args getEmptyArgsInstance() { return new get_table_args(); } protected 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; } } private 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"); } protected get_table_objects_by_name_args getEmptyArgsInstance() { return new get_table_objects_by_name_args(); } protected get_table_objects_by_name_result getResult(I iface, get_table_objects_by_name_args args) throws org.apache.thrift.TException { get_table_objects_by_name_result result = new get_table_objects_by_name_result(); try { result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); } catch (MetaException o1) { result.o1 = o1; } catch (InvalidOperationException o2) { result.o2 = o2; } catch (UnknownDBException o3) { result.o3 = o3; } return result; } } private 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"); } protected get_table_names_by_filter_args getEmptyArgsInstance() { return new get_table_names_by_filter_args(); } protected 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; } } private static class alter_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_table_args> { public alter_table() { super("alter_table"); } protected alter_table_args getEmptyArgsInstance() { return new alter_table_args(); } protected 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; } } private static class add_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partition_args> { public add_partition() { super("add_partition"); } protected add_partition_args getEmptyArgsInstance() { return new add_partition_args(); } protected 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; } } private static class add_partitions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partitions_args> { public add_partitions() { super("add_partitions"); } protected add_partitions_args getEmptyArgsInstance() { return new add_partitions_args(); } protected 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; } } private static class append_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_partition_args> { public append_partition() { super("append_partition"); } protected append_partition_args getEmptyArgsInstance() { return new append_partition_args(); } protected 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; } } private 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"); } protected append_partition_by_name_args getEmptyArgsInstance() { return new append_partition_by_name_args(); } protected 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; } } private static class drop_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_partition_args> { public drop_partition() { super("drop_partition"); } protected drop_partition_args getEmptyArgsInstance() { return new drop_partition_args(); } protected 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; } } private 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"); } protected drop_partition_by_name_args getEmptyArgsInstance() { return new drop_partition_by_name_args(); } protected 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; } } private static class get_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partition_args> { public get_partition() { super("get_partition"); } protected get_partition_args getEmptyArgsInstance() { return new get_partition_args(); } protected 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; } } private 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"); } protected get_partition_with_auth_args getEmptyArgsInstance() { return new get_partition_with_auth_args(); } protected 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; } } private 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"); } protected get_partition_by_name_args getEmptyArgsInstance() { return new get_partition_by_name_args(); } protected 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; } } private static class get_partitions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_partitions_args> { public get_partitions() { super("get_partitions"); } protected get_partitions_args getEmptyArgsInstance() { return new get_partitions_args(); } protected 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; } } private 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"); } protected get_partitions_with_auth_args getEmptyArgsInstance() { return new get_partitions_with_auth_args(); } protected 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; } } private 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"); } protected get_partition_names_args getEmptyArgsInstance() { return new get_partition_names_args(); } protected 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; } } private 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"); } protected get_partitions_ps_args getEmptyArgsInstance() { return new get_partitions_ps_args(); } protected 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; } } private 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"); } protected get_partitions_ps_with_auth_args getEmptyArgsInstance() { return new get_partitions_ps_with_auth_args(); } protected 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; } } private 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"); } protected get_partition_names_ps_args getEmptyArgsInstance() { return new get_partition_names_ps_args(); } protected 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; } } private 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"); } protected get_partitions_by_filter_args getEmptyArgsInstance() { return new get_partitions_by_filter_args(); } protected 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; } } private 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"); } protected get_partitions_by_names_args getEmptyArgsInstance() { return new get_partitions_by_names_args(); } protected 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; } } private static class alter_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partition_args> { public alter_partition() { super("alter_partition"); } protected alter_partition_args getEmptyArgsInstance() { return new alter_partition_args(); } protected 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; } } private static class rename_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_partition_args> { public rename_partition() { super("rename_partition"); } protected rename_partition_args getEmptyArgsInstance() { return new rename_partition_args(); } protected 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; } } private 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"); } protected get_config_value_args getEmptyArgsInstance() { return new get_config_value_args(); } protected 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; } } private 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"); } protected partition_name_to_vals_args getEmptyArgsInstance() { return new partition_name_to_vals_args(); } protected 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; } } private 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"); } protected partition_name_to_spec_args getEmptyArgsInstance() { return new partition_name_to_spec_args(); } protected 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; } } private static class markPartitionForEvent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPartitionForEvent_args> { public markPartitionForEvent() { super("markPartitionForEvent"); } protected markPartitionForEvent_args getEmptyArgsInstance() { return new markPartitionForEvent_args(); } protected 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; } } private static class isPartitionMarkedForEvent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isPartitionMarkedForEvent_args> { public isPartitionMarkedForEvent() { super("isPartitionMarkedForEvent"); } protected isPartitionMarkedForEvent_args getEmptyArgsInstance() { return new isPartitionMarkedForEvent_args(); } protected 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; } } private static class add_index<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_index_args> { public add_index() { super("add_index"); } protected add_index_args getEmptyArgsInstance() { return new add_index_args(); } protected 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; } } private static class alter_index<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_index_args> { public alter_index() { super("alter_index"); } protected alter_index_args getEmptyArgsInstance() { return new alter_index_args(); } protected 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; } } private 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"); } protected drop_index_by_name_args getEmptyArgsInstance() { return new drop_index_by_name_args(); } protected 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; } } private 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"); } protected get_index_by_name_args getEmptyArgsInstance() { return new get_index_by_name_args(); } protected 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; } } private static class get_indexes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_indexes_args> { public get_indexes() { super("get_indexes"); } protected get_indexes_args getEmptyArgsInstance() { return new get_indexes_args(); } protected 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; } } private 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"); } protected get_index_names_args getEmptyArgsInstance() { return new get_index_names_args(); } protected 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; } } private static class create_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_role_args> { public create_role() { super("create_role"); } protected create_role_args getEmptyArgsInstance() { return new create_role_args(); } protected 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; } } private static class drop_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_role_args> { public drop_role() { super("drop_role"); } protected drop_role_args getEmptyArgsInstance() { return new drop_role_args(); } protected 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; } } private 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"); } protected get_role_names_args getEmptyArgsInstance() { return new get_role_names_args(); } protected 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; } } private static class grant_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_role_args> { public grant_role() { super("grant_role"); } protected grant_role_args getEmptyArgsInstance() { return new grant_role_args(); } protected 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; } } private static class revoke_role<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revoke_role_args> { public revoke_role() { super("revoke_role"); } protected revoke_role_args getEmptyArgsInstance() { return new revoke_role_args(); } protected 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; } } private static class list_roles<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_roles_args> { public list_roles() { super("list_roles"); } protected list_roles_args getEmptyArgsInstance() { return new list_roles_args(); } protected 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; } } private 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"); } protected get_privilege_set_args getEmptyArgsInstance() { return new get_privilege_set_args(); } protected 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; } } private static class list_privileges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, list_privileges_args> { public list_privileges() { super("list_privileges"); } protected list_privileges_args getEmptyArgsInstance() { return new list_privileges_args(); } protected 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; } } private static class grant_privileges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, grant_privileges_args> { public grant_privileges() { super("grant_privileges"); } protected grant_privileges_args getEmptyArgsInstance() { return new grant_privileges_args(); } protected 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; } } private static class revoke_privileges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revoke_privileges_args> { public revoke_privileges() { super("revoke_privileges"); } protected revoke_privileges_args getEmptyArgsInstance() { return new revoke_privileges_args(); } protected 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; } } private static class set_ugi<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_ugi_args> { public set_ugi() { super("set_ugi"); } protected set_ugi_args getEmptyArgsInstance() { return new set_ugi_args(); } protected 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; } } private 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"); } protected get_delegation_token_args getEmptyArgsInstance() { return new get_delegation_token_args(); } protected 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; } } private 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"); } protected renew_delegation_token_args getEmptyArgsInstance() { return new renew_delegation_token_args(); } protected 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; } } private 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"); } protected cancel_delegation_token_args getEmptyArgsInstance() { return new cancel_delegation_token_args(); } protected 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 create_database_args implements org.apache.thrift.TBase<create_database_args, create_database_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_args"); private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(create_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_database_args typedOther = (create_database_args)other; lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); if (lastComparison != 0) { return lastComparison; } if (isSetDatabase()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, typedOther.database); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DATABASE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.database = new Database(); this.database.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.database != null) { oprot.writeFieldBegin(DATABASE_FIELD_DESC); this.database.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_database_result implements org.apache.thrift.TBase<create_database_result, create_database_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(create_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_database_result typedOther = (create_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_database_args implements org.apache.thrift.TBase<get_database_args, get_database_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(get_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_database_args typedOther = (get_database_args)other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_database_result implements org.apache.thrift.TBase<get_database_result, get_database_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_database_result typedOther = (get_database_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Database(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_database_args implements org.apache.thrift.TBase<drop_database_args, drop_database_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } public boolean isCascade() { return this.cascade; } public void setCascade(boolean cascade) { this.cascade = cascade; setCascadeIsSet(true); } public void unsetCascade() { __isset_bit_vector.clear(__CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { return __isset_bit_vector.get(__CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { __isset_bit_vector.set(__CASCADE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; case CASCADE: if (value == null) { unsetCascade(); } else { setCascade((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); case CASCADE: return Boolean.valueOf(isCascade()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case DELETE_DATA: return isSetDeleteData(); case CASCADE: return isSetCascade(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_database_args) return this.equals((drop_database_args)that); return false; } public boolean equals(drop_database_args that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } boolean this_present_cascade = true; boolean that_present_cascade = true; if (this_present_cascade || that_present_cascade) { if (!(this_present_cascade && that_present_cascade)) return false; if (this.cascade != that.cascade) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_database_args typedOther = (drop_database_args)other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(typedOther.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, typedOther.cascade); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DELETE_DATA if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.deleteData = iprot.readBool(); setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // CASCADE if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.cascade = iprot.readBool(); setCascadeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldBegin(CASCADE_FIELD_DESC); oprot.writeBool(this.cascade); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_database_result implements org.apache.thrift.TBase<drop_database_result, drop_database_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(drop_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_database_result typedOther = (drop_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidOperationException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_databases_args implements org.apache.thrift.TBase<get_databases_args, get_databases_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_args"); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(get_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_databases_args typedOther = (get_databases_args)other; lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATTERN if (field.type == org.apache.thrift.protocol.TType.STRING) { this.pattern = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.pattern != null) { oprot.writeFieldBegin(PATTERN_FIELD_DESC); oprot.writeString(this.pattern); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_databases_result implements org.apache.thrift.TBase<get_databases_result, get_databases_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_databases_result deepCopy() { return new get_databases_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_databases_result typedOther = (get_databases_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); this.success = new ArrayList<String>(_list98.size); for (int _i99 = 0; _i99 < _list98.size; ++_i99) { String _elem100; // required _elem100 = iprot.readString(); this.success.add(_elem100); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter101 : this.success) { oprot.writeString(_iter101); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_all_databases_args implements org.apache.thrift.TBase<get_all_databases_args, get_all_databases_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(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() { return 0; } public int compareTo(get_all_databases_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_databases_args typedOther = (get_all_databases_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_all_databases_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_all_databases_result implements org.apache.thrift.TBase<get_all_databases_result, get_all_databases_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_all_databases_result deepCopy() { return new get_all_databases_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_all_databases_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_databases_result typedOther = (get_all_databases_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list102 = iprot.readListBegin(); this.success = new ArrayList<String>(_list102.size); for (int _i103 = 0; _i103 < _list102.size; ++_i103) { String _elem104; // required _elem104 = iprot.readString(); this.success.add(_elem104); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter105 : this.success) { oprot.writeString(_iter105); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_database_args implements org.apache.thrift.TBase<alter_database_args, alter_database_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(alter_database_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_database_args typedOther = (alter_database_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDb()).compareTo(typedOther.isSetDb()); if (lastComparison != 0) { return lastComparison; } if (isSetDb()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, typedOther.db); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DB if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.db = new Database(); this.db.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.db != null) { oprot.writeFieldBegin(DB_FIELD_DESC); this.db.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_database_result implements org.apache.thrift.TBase<alter_database_result, alter_database_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(alter_database_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_database_result typedOther = (alter_database_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_type_args implements org.apache.thrift.TBase<get_type_args, get_type_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(get_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_args typedOther = (get_type_args)other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_type_result implements org.apache.thrift.TBase<get_type_result, get_type_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_result typedOther = (get_type_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Type(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_type_args implements org.apache.thrift.TBase<create_type_args, create_type_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(create_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_type_args typedOther = (create_type_args)other; lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TYPE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.type = new Type(); this.type.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); this.type.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_type_result implements org.apache.thrift.TBase<create_type_result, create_type_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public AlreadyExistsException getO1() { return this.o1; } public void setO1(AlreadyExistsException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public InvalidObjectException getO2() { return this.o2; } public void setO2(InvalidObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((AlreadyExistsException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_type_result) return this.equals((create_type_result)that); return false; } public boolean equals(create_type_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(create_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_type_result typedOther = (create_type_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_type_args implements org.apache.thrift.TBase<drop_type_args, drop_type_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(drop_type_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_type_args typedOther = (drop_type_args)other; lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TYPE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.type = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeString(this.type); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_type_result implements org.apache.thrift.TBase<drop_type_result, drop_type_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_type_result) return this.equals((drop_type_result)that); return false; } public boolean equals(drop_type_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_type_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_type_result typedOther = (drop_type_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_type_all_args implements org.apache.thrift.TBase<get_type_all_args, get_type_all_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(get_type_all_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_all_args typedOther = (get_type_all_args)other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_type_all_result implements org.apache.thrift.TBase<get_type_all_result, get_type_all_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); 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() { return 0; } public int compareTo(get_type_all_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_type_all_result typedOther = (get_type_all_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin(); this.success = new HashMap<String,Type>(2*_map106.size); for (int _i107 = 0; _i107 < _map106.size; ++_i107) { String _key108; // required Type _val109; // required _key108 = iprot.readString(); _val109 = new Type(); _val109.read(iprot); this.success.put(_key108, _val109); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Map.Entry<String, Type> _iter110 : this.success.entrySet()) { oprot.writeString(_iter110.getKey()); _iter110.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_fields_args implements org.apache.thrift.TBase<get_fields_args, get_fields_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_fields_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_args typedOther = (get_fields_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TABLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.table_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(this.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_fields_result implements org.apache.thrift.TBase<get_fields_result, get_fields_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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>(); 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() { return 0; } public int compareTo(get_fields_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_fields_result typedOther = (get_fields_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list111 = iprot.readListBegin(); this.success = new ArrayList<FieldSchema>(_list111.size); for (int _i112 = 0; _i112 < _list111.size; ++_i112) { FieldSchema _elem113; // required _elem113 = new FieldSchema(); _elem113.read(iprot); this.success.add(_elem113); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new UnknownTableException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (FieldSchema _iter114 : this.success) { _iter114.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_schema_args implements org.apache.thrift.TBase<get_schema_args, get_schema_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_schema_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_args typedOther = (get_schema_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTable_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TABLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.table_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.table_name != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(this.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_schema_result implements org.apache.thrift.TBase<get_schema_result, get_schema_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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>(); 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() { return 0; } public int compareTo(get_schema_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_schema_result typedOther = (get_schema_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list115 = iprot.readListBegin(); this.success = new ArrayList<FieldSchema>(_list115.size); for (int _i116 = 0; _i116 < _list115.size; ++_i116) { FieldSchema _elem117; // required _elem117 = new FieldSchema(); _elem117.read(iprot); this.success.add(_elem117); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new UnknownTableException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (FieldSchema _iter118 : this.success) { _iter118.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_table_args implements org.apache.thrift.TBase<create_table_args, create_table_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_args"); private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(create_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_args typedOther = (create_table_args)other; lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, typedOther.tbl); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TBL if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.tbl = new Table(); this.tbl.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.tbl != null) { oprot.writeFieldBegin(TBL_FIELD_DESC); this.tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_table_result implements org.apache.thrift.TBase<create_table_result, create_table_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private 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() { return 0; } public int compareTo(create_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_table_result typedOther = (create_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // O4 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o4 = new NoSuchObjectException(); this.o4.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO4()) { oprot.writeFieldBegin(O4_FIELD_DESC); this.o4.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_table_args implements org.apache.thrift.TBase<drop_table_args, drop_table_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case NAME: return getName(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DBNAME: return isSetDbname(); case NAME: return isSetName(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_table_args) return this.equals((drop_table_args)that); return false; } public boolean equals(drop_table_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_args typedOther = (drop_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // DELETE_DATA if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.deleteData = iprot.readBool(); setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_table_result implements org.apache.thrift.TBase<drop_table_result, drop_table_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(drop_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_table_result typedOther = (drop_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_tables_args implements org.apache.thrift.TBase<get_tables_args, get_tables_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("pattern", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_tables_args typedOther = (get_tables_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } if (isSetPattern()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PATTERN if (field.type == org.apache.thrift.protocol.TType.STRING) { this.pattern = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.pattern != null) { oprot.writeFieldBegin(PATTERN_FIELD_DESC); oprot.writeString(this.pattern); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_tables_result implements org.apache.thrift.TBase<get_tables_result, get_tables_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_tables_result deepCopy() { return new get_tables_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_tables_result typedOther = (get_tables_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(); this.success = new ArrayList<String>(_list119.size); for (int _i120 = 0; _i120 < _list119.size; ++_i120) { String _elem121; // required _elem121 = iprot.readString(); this.success.add(_elem121); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter122 : this.success) { oprot.writeString(_iter122); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_all_tables_args implements org.apache.thrift.TBase<get_all_tables_args, get_all_tables_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(get_all_tables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_tables_args typedOther = (get_all_tables_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_all_tables_result implements org.apache.thrift.TBase<get_all_tables_result, get_all_tables_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_all_tables_result deepCopy() { return new get_all_tables_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_all_tables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_all_tables_result typedOther = (get_all_tables_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list123 = iprot.readListBegin(); this.success = new ArrayList<String>(_list123.size); for (int _i124 = 0; _i124 < _list123.size; ++_i124) { String _elem125; // required _elem125 = iprot.readString(); this.success.add(_elem125); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter126 : this.success) { oprot.writeString(_iter126); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_table_args implements org.apache.thrift.TBase<get_table_args, get_table_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_args typedOther = (get_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_table_result implements org.apache.thrift.TBase<get_table_result, get_table_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_result typedOther = (get_table_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Table(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { 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 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>(); for (String other_element : other.tbl_names) { __this__tbl_names.add(other_element); } this.tbl_names = __this__tbl_names; } } public get_table_objects_by_name_args deepCopy() { return new get_table_objects_by_name_args(this); } @Override public void clear() { this.dbname = null; this.tbl_names = null; } public String getDbname() { return this.dbname; } public void setDbname(String dbname) { this.dbname = dbname; } public void unsetDbname() { this.dbname = null; } /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } public void setDbnameIsSet(boolean value) { if (!value) { this.dbname = null; } } public int getTbl_namesSize() { return (this.tbl_names == null) ? 0 : this.tbl_names.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_table_objects_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_objects_by_name_args typedOther = (get_table_objects_by_name_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_names()).compareTo(typedOther.isSetTbl_names()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_names, typedOther.tbl_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(); this.tbl_names = new ArrayList<String>(_list127.size); for (int _i128 = 0; _i128 < _list127.size; ++_i128) { String _elem129; // required _elem129 = iprot.readString(); this.tbl_names.add(_elem129); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.tbl_names != null) { oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.tbl_names.size())); for (String _iter130 : this.tbl_names) { oprot.writeString(_iter130); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private List<Table> 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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_result.class, metaDataMap); } public get_table_objects_by_name_result() { } public get_table_objects_by_name_result( List<Table> 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_result(get_table_objects_by_name_result other) { if (other.isSetSuccess()) { List<Table> __this__success = new ArrayList<Table>(); for (Table other_element : other.success) { __this__success.add(new Table(other_element)); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidOperationException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_table_objects_by_name_result deepCopy() { return new get_table_objects_by_name_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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 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<Table>)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((InvalidOperationException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_objects_by_name_result) return this.equals((get_table_objects_by_name_result)that); return false; } public boolean equals(get_table_objects_by_name_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_table_objects_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_objects_by_name_result typedOther = (get_table_objects_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list131 = iprot.readListBegin(); this.success = new ArrayList<Table>(_list131.size); for (int _i132 = 0; _i132 < _list131.size; ++_i132) { Table _elem133; // required _elem133 = new Table(); _elem133.read(iprot); this.success.add(_elem133); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidOperationException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Table _iter134 : this.success) { _iter134.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_table_objects_by_name_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); } else { sb.append(this.o1); } first = false; if (!first) sb.append(", "); sb.append("o2:"); if (this.o2 == null) { sb.append("null"); } else { sb.append(this.o2); } first = false; if (!first) sb.append(", "); sb.append("o3:"); if (this.o3 == null) { sb.append("null"); } else { sb.append(this.o3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_TABLES_ISSET_ID); } public void setMax_tablesIsSet(boolean value) { __isset_bit_vector.set(__MAX_TABLES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: if (value == null) { unsetDbname(); } else { setDbname((String)value); } break; case FILTER: if (value == null) { unsetFilter(); } else { setFilter((String)value); } break; case MAX_TABLES: if (value == null) { unsetMax_tables(); } else { setMax_tables((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DBNAME: return getDbname(); case FILTER: return getFilter(); case MAX_TABLES: return Short.valueOf(getMax_tables()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DBNAME: return isSetDbname(); case FILTER: return isSetFilter(); case MAX_TABLES: return isSetMax_tables(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_table_names_by_filter_args) return this.equals((get_table_names_by_filter_args)that); return false; } public boolean equals(get_table_names_by_filter_args that) { if (that == null) return false; boolean this_present_dbname = true && this.isSetDbname(); boolean that_present_dbname = true && that.isSetDbname(); if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; if (!this.dbname.equals(that.dbname)) return false; } boolean this_present_filter = true && this.isSetFilter(); boolean that_present_filter = true && that.isSetFilter(); if (this_present_filter || that_present_filter) { if (!(this_present_filter && that_present_filter)) return false; if (!this.filter.equals(that.filter)) return false; } boolean this_present_max_tables = true; boolean that_present_max_tables = true; if (this_present_max_tables || that_present_max_tables) { if (!(this_present_max_tables && that_present_max_tables)) return false; if (this.max_tables != that.max_tables) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_table_names_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_names_by_filter_args typedOther = (get_table_names_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(typedOther.isSetMax_tables()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_tables()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_tables, typedOther.max_tables); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FILTER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.filter = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_TABLES if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_tables = iprot.readI16(); setMax_tablesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.filter != null) { oprot.writeFieldBegin(FILTER_FIELD_DESC); oprot.writeString(this.filter); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_TABLES_FIELD_DESC); oprot.writeI16(this.max_tables); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { 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 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new InvalidOperationException(other.o2); } if (other.isSetO3()) { this.o3 = new UnknownDBException(other.o3); } } public get_table_names_by_filter_result deepCopy() { return new get_table_names_by_filter_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_table_names_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_table_names_by_filter_result typedOther = (get_table_names_by_filter_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list135 = iprot.readListBegin(); this.success = new ArrayList<String>(_list135.size); for (int _i136 = 0; _i136 < _list135.size; ++_i136) { String _elem137; // required _elem137 = iprot.readString(); this.success.add(_elem137); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new InvalidOperationException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter138 : this.success) { oprot.writeString(_iter138); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_table_args implements org.apache.thrift.TBase<alter_table_args, alter_table_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("new_tbl", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(alter_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_args typedOther = (alter_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_tbl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NEW_TBL if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_tbl = new Table(); this.new_tbl.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.new_tbl != null) { oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); this.new_tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_table_result implements org.apache.thrift.TBase<alter_table_result, alter_table_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(alter_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_table_result typedOther = (alter_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_partition_args implements org.apache.thrift.TBase<add_partition_args, add_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_args"); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(add_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_args typedOther = (add_partition_args)other; lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NEW_PART if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_part = new Partition(); this.new_part.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_partition_result implements org.apache.thrift.TBase<add_partition_result, add_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(add_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partition_result typedOther = (add_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_partitions_args implements org.apache.thrift.TBase<add_partitions_args, add_partitions_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_args"); private static final org.apache.thrift.protocol.TField NEW_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("new_parts", org.apache.thrift.protocol.TType.LIST, (short)1); private 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>(); 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() { return 0; } public int compareTo(add_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_args typedOther = (add_partitions_args)other; lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(typedOther.isSetNew_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, typedOther.new_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NEW_PARTS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list139 = iprot.readListBegin(); this.new_parts = new ArrayList<Partition>(_list139.size); for (int _i140 = 0; _i140 < _list139.size; ++_i140) { Partition _elem141; // required _elem141 = new Partition(); _elem141.read(iprot); this.new_parts.add(_elem141); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.new_parts != null) { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); for (Partition _iter142 : this.new_parts) { _iter142.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_partitions_result implements org.apache.thrift.TBase<add_partitions_result, add_partitions_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public InvalidObjectException getO1() { return this.o1; } public void setO1(InvalidObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public AlreadyExistsException getO2() { return this.o2; } public void setO2(AlreadyExistsException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public MetaException getO3() { return this.o3; } public void setO3(MetaException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Integer)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((InvalidObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((AlreadyExistsException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(getSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof add_partitions_result) return this.equals((add_partitions_result)that); return false; } public boolean equals(add_partitions_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(add_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_partitions_result typedOther = (add_partitions_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.I32) { this.success = iprot.readI32(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class append_partition_args implements org.apache.thrift.TBase<append_partition_args, append_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } } public append_partition_args deepCopy() { return new append_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(append_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_args typedOther = (append_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list143.size); for (int _i144 = 0; _i144 < _list143.size; ++_i144) { String _elem145; // required _elem145 = iprot.readString(); this.part_vals.add(_elem145); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter146 : this.part_vals) { oprot.writeString(_iter146); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class append_partition_result implements org.apache.thrift.TBase<append_partition_result, append_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(append_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_result typedOther = (append_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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() { return 0; } public int compareTo(append_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_args typedOther = (append_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.part_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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() { return 0; } public int compareTo(append_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; append_partition_by_name_result typedOther = (append_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_partition_args implements org.apache.thrift.TBase<drop_partition_args, drop_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.deleteData = other.deleteData; } public drop_partition_args deepCopy() { return new drop_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; setDeleteDataIsSet(false); this.deleteData = false; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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_bit_vector.clear(__DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bit_vector.set(__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 Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_args) return this.equals((drop_partition_args)that); return false; } public boolean equals(drop_partition_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_args typedOther = (drop_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list147 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list147.size); for (int _i148 = 0; _i148 < _list147.size; ++_i148) { String _elem149; // required _elem149 = iprot.readString(); this.part_vals.add(_elem149); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // DELETE_DATA if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.deleteData = iprot.readBool(); setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter150 : this.part_vals) { oprot.writeString(_iter150); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_partition_result implements org.apache.thrift.TBase<drop_partition_result, drop_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_result) return this.equals((drop_partition_result)that); return false; } public boolean equals(drop_partition_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_result typedOther = (drop_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case PART_NAME: if (value == null) { unsetPart_name(); } else { setPart_name((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case PART_NAME: return getPart_name(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_NAME: return isSetPart_name(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_args) return this.equals((drop_partition_by_name_args)that); return false; } public boolean equals(drop_partition_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_name = true && this.isSetPart_name(); boolean that_present_part_name = true && that.isSetPart_name(); if (this_present_part_name || that_present_part_name) { if (!(this_present_part_name && that_present_part_name)) return false; if (!this.part_name.equals(that.part_name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.part_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // DELETE_DATA if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.deleteData = iprot.readBool(); setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_partition_by_name_result) return this.equals((drop_partition_by_name_result)that); return false; } public boolean equals(drop_partition_by_name_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_args implements org.apache.thrift.TBase<get_partition_args, get_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } } public get_partition_args deepCopy() { return new get_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_args typedOther = (get_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list151 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list151.size); for (int _i152 = 0; _i152 < _list151.size; ++_i152) { String _elem153; // required _elem153 = iprot.readString(); this.part_vals.add(_elem153); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter154 : this.part_vals) { oprot.writeString(_iter154); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_result implements org.apache.thrift.TBase<get_partition_result, get_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_result typedOther = (get_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_with_auth_args implements org.apache.thrift.TBase<get_partition_with_auth_args, get_partition_with_auth_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); private 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List<String> __this__group_names = new ArrayList<String>(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partition_with_auth_args deepCopy() { return new get_partition_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_partition_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_with_auth_args typedOther = (get_partition_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list155 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list155.size); for (int _i156 = 0; _i156 < _list155.size; ++_i156) { String _elem157; // required _elem157 = iprot.readString(); this.part_vals.add(_elem157); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // USER_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list158 = iprot.readListBegin(); this.group_names = new ArrayList<String>(_list158.size); for (int _i159 = 0; _i159 < _list158.size; ++_i159) { String _elem160; // required _elem160 = iprot.readString(); this.group_names.add(_elem160); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter161 : this.part_vals) { oprot.writeString(_iter161); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (this.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(this.user_name); oprot.writeFieldEnd(); } if (this.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); for (String _iter162 : this.group_names) { oprot.writeString(_iter162); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_with_auth_result implements org.apache.thrift.TBase<get_partition_with_auth_result, get_partition_with_auth_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_partition_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_with_auth_result typedOther = (get_partition_with_auth_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_by_name_args implements org.apache.thrift.TBase<get_partition_by_name_args, get_partition_by_name_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); private 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() { return 0; } public int compareTo(get_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_by_name_args typedOther = (get_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.part_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_by_name_result implements org.apache.thrift.TBase<get_partition_by_name_result, get_partition_by_name_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_by_name_result typedOther = (get_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_args implements org.apache.thrift.TBase<get_partitions_args, get_partitions_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_args) return this.equals((get_partitions_args)that); return false; } public boolean equals(get_partitions_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_args typedOther = (get_partitions_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_result implements org.apache.thrift.TBase<get_partitions_result, get_partitions_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_result typedOther = (get_partitions_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list163 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list163.size); for (int _i164 = 0; _i164 < _list163.size; ++_i164) { Partition _elem165; // required _elem165 = new Partition(); _elem165.read(iprot); this.success.add(_elem165); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter166 : this.success) { _iter166.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_with_auth_args implements org.apache.thrift.TBase<get_partitions_with_auth_args, get_partitions_with_auth_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)5); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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>(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partitions_with_auth_args deepCopy() { return new get_partitions_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.max_parts = (short)-1; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; setMax_partsIsSet(true); } public void unsetMax_parts() { __isset_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__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 Short.valueOf(getMax_parts()); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_with_auth_args) return this.equals((get_partitions_with_auth_args)that); return false; } public boolean equals(get_partitions_with_auth_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partitions_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_with_auth_args typedOther = (get_partitions_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // USER_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list167 = iprot.readListBegin(); this.group_names = new ArrayList<String>(_list167.size); for (int _i168 = 0; _i168 < _list167.size; ++_i168) { String _elem169; // required _elem169 = iprot.readString(); this.group_names.add(_elem169); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); if (this.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(this.user_name); oprot.writeFieldEnd(); } if (this.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); for (String _iter170 : this.group_names) { oprot.writeString(_iter170); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_with_auth_result implements org.apache.thrift.TBase<get_partitions_with_auth_result, get_partitions_with_auth_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_partitions_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_with_auth_result typedOther = (get_partitions_with_auth_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list171 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list171.size); for (int _i172 = 0; _i172 < _list171.size; ++_i172) { Partition _elem173; // required _elem173 = new Partition(); _elem173.read(iprot); this.success.add(_elem173); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter174 : this.success) { _iter174.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_names_args implements org.apache.thrift.TBase<get_partition_names_args, get_partition_names_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_args) return this.equals((get_partition_names_args)that); return false; } public boolean equals(get_partition_names_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partition_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_args typedOther = (get_partition_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_names_result implements org.apache.thrift.TBase<get_partition_names_result, get_partition_names_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_partition_names_result deepCopy() { return new get_partition_names_result(this); } @Override public void clear() { this.success = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_partition_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_result typedOther = (get_partition_names_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list175 = iprot.readListBegin(); this.success = new ArrayList<String>(_list175.size); for (int _i176 = 0; _i176 < _list175.size; ++_i176) { String _elem177; // required _elem177 = iprot.readString(); this.success.add(_elem177); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter178 : this.success) { oprot.writeString(_iter178); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_ps_args implements org.apache.thrift.TBase<get_partitions_ps_args, get_partitions_ps_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; } public get_partitions_ps_args deepCopy() { return new get_partitions_ps_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__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 Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_args) return this.equals((get_partitions_ps_args)that); return false; } public boolean equals(get_partitions_ps_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partitions_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_args typedOther = (get_partitions_ps_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list179 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list179.size); for (int _i180 = 0; _i180 < _list179.size; ++_i180) { String _elem181; // required _elem181 = iprot.readString(); this.part_vals.add(_elem181); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter182 : this.part_vals) { oprot.writeString(_iter182); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_ps_result implements org.apache.thrift.TBase<get_partitions_ps_result, get_partitions_ps_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_partitions_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_result typedOther = (get_partitions_ps_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list183 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list183.size); for (int _i184 = 0; _i184 < _list183.size; ++_i184) { Partition _elem185; // required _elem185 = new Partition(); _elem185.read(iprot); this.success.add(_elem185); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter186 : this.success) { _iter186.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; if (other.isSetUser_name()) { this.user_name = other.user_name; } if (other.isSetGroup_names()) { List<String> __this__group_names = new ArrayList<String>(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_partitions_ps_with_auth_args deepCopy() { return new get_partitions_ps_with_auth_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; this.user_name = null; this.group_names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__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 Short.valueOf(getMax_parts()); case USER_NAME: return getUser_name(); case GROUP_NAMES: return getGroup_names(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); case USER_NAME: return isSetUser_name(); case GROUP_NAMES: return isSetGroup_names(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_ps_with_auth_args) return this.equals((get_partitions_ps_with_auth_args)that); return false; } public boolean equals(get_partitions_ps_with_auth_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } boolean this_present_user_name = true && this.isSetUser_name(); boolean that_present_user_name = true && that.isSetUser_name(); if (this_present_user_name || that_present_user_name) { if (!(this_present_user_name && that_present_user_name)) return false; if (!this.user_name.equals(that.user_name)) return false; } boolean this_present_group_names = true && this.isSetGroup_names(); boolean that_present_group_names = true && that.isSetGroup_names(); if (this_present_group_names || that_present_group_names) { if (!(this_present_group_names && that_present_group_names)) return false; if (!this.group_names.equals(that.group_names)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partitions_ps_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_with_auth_args typedOther = (get_partitions_ps_with_auth_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list187 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list187.size); for (int _i188 = 0; _i188 < _list187.size; ++_i188) { String _elem189; // required _elem189 = iprot.readString(); this.part_vals.add(_elem189); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // USER_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list190 = iprot.readListBegin(); this.group_names = new ArrayList<String>(_list190.size); for (int _i191 = 0; _i191 < _list190.size; ++_i191) { String _elem192; // required _elem192 = iprot.readString(); this.group_names.add(_elem192); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter193 : this.part_vals) { oprot.writeString(_iter193); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); if (this.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(this.user_name); oprot.writeFieldEnd(); } if (this.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); for (String _iter194 : this.group_names) { oprot.writeString(_iter194); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_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 { 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 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>(); 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() { return 0; } public int compareTo(get_partitions_ps_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_ps_with_auth_result typedOther = (get_partitions_ps_with_auth_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list195 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list195.size); for (int _i196 = 0; _i196 < _list195.size; ++_i196) { Partition _elem197; // required _elem197 = new Partition(); _elem197.read(iprot); this.success.add(_elem197); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter198 : this.success) { _iter198.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_names_ps_args implements org.apache.thrift.TBase<get_partition_names_ps_args, get_partition_names_ps_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } this.max_parts = other.max_parts; } public get_partition_names_ps_args deepCopy() { return new get_partition_names_ps_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.max_parts = (short)-1; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__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 Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partition_names_ps_args) return this.equals((get_partition_names_ps_args)that); return false; } public boolean equals(get_partition_names_ps_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_part_vals = true && this.isSetPart_vals(); boolean that_present_part_vals = true && that.isSetPart_vals(); if (this_present_part_vals || that_present_part_vals) { if (!(this_present_part_vals && that_present_part_vals)) return false; if (!this.part_vals.equals(that.part_vals)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partition_names_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list199 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list199.size); for (int _i200 = 0; _i200 < _list199.size; ++_i200) { String _elem201; // required _elem201 = iprot.readString(); this.part_vals.add(_elem201); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter202 : this.part_vals) { oprot.writeString(_iter202); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partition_names_ps_result implements org.apache.thrift.TBase<get_partition_names_ps_result, get_partition_names_ps_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { this.o2 = new NoSuchObjectException(other.o2); } } public get_partition_names_ps_result deepCopy() { return new get_partition_names_ps_result(this); } @Override public void clear() { this.success = null; this.o1 = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_partition_names_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list203 = iprot.readListBegin(); this.success = new ArrayList<String>(_list203.size); for (int _i204 = 0; _i204 < _list203.size; ++_i204) { String _elem205; // required _elem205 = iprot.readString(); this.success.add(_elem205); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter206 : this.success) { oprot.writeString(_iter206); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_by_filter_args implements org.apache.thrift.TBase<get_partitions_by_filter_args, get_partitions_by_filter_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_parts", org.apache.thrift.protocol.TType.I16, (short)4); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } public void setMax_partsIsSet(boolean value) { __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case FILTER: if (value == null) { unsetFilter(); } else { setFilter((String)value); } break; case MAX_PARTS: if (value == null) { unsetMax_parts(); } else { setMax_parts((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case FILTER: return getFilter(); case MAX_PARTS: return Short.valueOf(getMax_parts()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case FILTER: return isSetFilter(); case MAX_PARTS: return isSetMax_parts(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_partitions_by_filter_args) return this.equals((get_partitions_by_filter_args)that); return false; } public boolean equals(get_partitions_by_filter_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_filter = true && this.isSetFilter(); boolean that_present_filter = true && that.isSetFilter(); if (this_present_filter || that_present_filter) { if (!(this_present_filter && that_present_filter)) return false; if (!this.filter.equals(that.filter)) return false; } boolean this_present_max_parts = true; boolean that_present_max_parts = true; if (this_present_max_parts || that_present_max_parts) { if (!(this_present_max_parts && that_present_max_parts)) return false; if (this.max_parts != that.max_parts) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_partitions_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } if (isSetFilter()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_parts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // FILTER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.filter = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // MAX_PARTS if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_parts = iprot.readI16(); setMax_partsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.filter != null) { oprot.writeFieldBegin(FILTER_FIELD_DESC); oprot.writeString(this.filter); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); oprot.writeI16(this.max_parts); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_by_filter_result implements org.apache.thrift.TBase<get_partitions_by_filter_result, get_partitions_by_filter_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_partitions_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list207 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list207.size); for (int _i208 = 0; _i208 < _list207.size; ++_i208) { Partition _elem209; // required _elem209 = new Partition(); _elem209.read(iprot); this.success.add(_elem209); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter210 : this.success) { _iter210.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_by_names_args implements org.apache.thrift.TBase<get_partitions_by_names_args, get_partitions_by_names_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("names", org.apache.thrift.protocol.TType.LIST, (short)3); private 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>(); for (String other_element : other.names) { __this__names.add(other_element); } this.names = __this__names; } } public get_partitions_by_names_args deepCopy() { return new get_partitions_by_names_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.names = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getNamesSize() { return (this.names == null) ? 0 : this.names.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_partitions_by_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_names_args typedOther = (get_partitions_by_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNames()).compareTo(typedOther.isSetNames()); if (lastComparison != 0) { return lastComparison; } if (isSetNames()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.names, typedOther.names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list211 = iprot.readListBegin(); this.names = new ArrayList<String>(_list211.size); for (int _i212 = 0; _i212 < _list211.size; ++_i212) { String _elem213; // required _elem213 = iprot.readString(); this.names.add(_elem213); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.names != null) { oprot.writeFieldBegin(NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.names.size())); for (String _iter214 : this.names) { oprot.writeString(_iter214); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_partitions_by_names_result implements org.apache.thrift.TBase<get_partitions_by_names_result, get_partitions_by_names_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_partitions_by_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_partitions_by_names_result typedOther = (get_partitions_by_names_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list215 = iprot.readListBegin(); this.success = new ArrayList<Partition>(_list215.size); for (int _i216 = 0; _i216 < _list215.size; ++_i216) { Partition _elem217; // required _elem217 = new Partition(); _elem217.read(iprot); this.success.add(_elem217); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Partition _iter218 : this.success) { _iter218.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_partition_args implements org.apache.thrift.TBase<alter_partition_args, alter_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(alter_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_args typedOther = (alter_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NEW_PART if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_part = new Partition(); this.new_part.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_partition_result implements org.apache.thrift.TBase<alter_partition_result, alter_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(alter_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_partition_result typedOther = (alter_partition_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class rename_partition_args implements org.apache.thrift.TBase<rename_partition_args, rename_partition_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField NEW_PART_FIELD_DESC = new org.apache.thrift.protocol.TField("new_part", org.apache.thrift.protocol.TType.STRUCT, (short)4); private 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>(); for (String other_element : other.part_vals) { __this__part_vals.add(other_element); } this.part_vals = __this__part_vals; } if (other.isSetNew_part()) { this.new_part = new Partition(other.new_part); } } public rename_partition_args deepCopy() { return new rename_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.new_part = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(rename_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_partition_args typedOther = (rename_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_part()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list219 = iprot.readListBegin(); this.part_vals = new ArrayList<String>(_list219.size); for (int _i220 = 0; _i220 < _list219.size; ++_i220) { String _elem221; // required _elem221 = iprot.readString(); this.part_vals.add(_elem221); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // NEW_PART if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_part = new Partition(); this.new_part.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.part_vals != null) { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); for (String _iter222 : this.part_vals) { oprot.writeString(_iter222); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (this.new_part != null) { oprot.writeFieldBegin(NEW_PART_FIELD_DESC); this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class rename_partition_result implements org.apache.thrift.TBase<rename_partition_result, rename_partition_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(rename_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_partition_result typedOther = (rename_partition_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_config_value_args implements org.apache.thrift.TBase<get_config_value_args, get_config_value_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_args"); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultValue", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_config_value_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_config_value_args typedOther = (get_config_value_args)other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); if (lastComparison != 0) { return lastComparison; } if (isSetDefaultValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DEFAULT_VALUE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.defaultValue = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(this.name); oprot.writeFieldEnd(); } if (this.defaultValue != null) { oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); oprot.writeString(this.defaultValue); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_config_value_result implements org.apache.thrift.TBase<get_config_value_result, get_config_value_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(get_config_value_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_config_value_result typedOther = (get_config_value_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new ConfigValSecurityException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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() { return 0; } public int compareTo(partition_name_to_vals_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.part_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public partition_name_to_vals_result deepCopy() { return new partition_name_to_vals_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(partition_name_to_vals_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list223 = iprot.readListBegin(); this.success = new ArrayList<String>(_list223.size); for (int _i224 = 0; _i224 < _list223.size; ++_i224) { String _elem225; // required _elem225 = iprot.readString(); this.success.add(_elem225); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter226 : this.success) { oprot.writeString(_iter226); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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() { return 0; } public int compareTo(partition_name_to_spec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_spec_args typedOther = (partition_name_to_spec_args)other; lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.part_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.part_name != null) { oprot.writeFieldBegin(PART_NAME_FIELD_DESC); oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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>(); for (Map.Entry<String, String> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; String __this__success_copy_value = other_element_value; __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } 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() { return 0; } public int compareTo(partition_name_to_spec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map227 = iprot.readMapBegin(); this.success = new HashMap<String,String>(2*_map227.size); for (int _i228 = 0; _i228 < _map227.size; ++_i228) { String _key229; // required String _val230; // required _key229 = iprot.readString(); _val230 = iprot.readString(); this.success.put(_key229, _val230); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size())); for (Map.Entry<String, String> _iter231 : this.success.entrySet()) { oprot.writeString(_iter231.getKey()); oprot.writeString(_iter231.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class markPartitionForEvent_args implements org.apache.thrift.TBase<markPartitionForEvent_args, markPartitionForEvent_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); private 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>(); for (Map.Entry<String, String> other_element : other.part_vals.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__part_vals_copy_key = other_element_key; String __this__part_vals_copy_value = other_element_value; __this__part_vals.put(__this__part_vals_copy_key, __this__part_vals_copy_value); } this.part_vals = __this__part_vals; } if (other.isSetEventType()) { this.eventType = other.eventType; } } public markPartitionForEvent_args deepCopy() { return new markPartitionForEvent_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.eventType = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public void putToPart_vals(String key, String val) { if (this.part_vals == null) { this.part_vals = new HashMap<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() { return 0; } public int compareTo(markPartitionForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; markPartitionForEvent_args typedOther = (markPartitionForEvent_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(typedOther.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, typedOther.eventType); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map232 = iprot.readMapBegin(); this.part_vals = new HashMap<String,String>(2*_map232.size); for (int _i233 = 0; _i233 < _map232.size; ++_i233) { String _key234; // required String _val235; // required _key234 = iprot.readString(); _val235 = iprot.readString(); this.part_vals.put(_key234, _val235); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // EVENT_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.eventType = PartitionEventType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.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, this.part_vals.size())); for (Map.Entry<String, String> _iter236 : this.part_vals.entrySet()) { oprot.writeString(_iter236.getKey()); oprot.writeString(_iter236.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (this.eventType != null) { oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); oprot.writeI32(this.eventType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class markPartitionForEvent_result implements org.apache.thrift.TBase<markPartitionForEvent_result, markPartitionForEvent_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); private 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() { return 0; } public int compareTo(markPartitionForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; markPartitionForEvent_result typedOther = (markPartitionForEvent_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(typedOther.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, typedOther.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(typedOther.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, typedOther.o6); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // O4 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o4 = new UnknownTableException(); this.o4.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // O5 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o5 = new UnknownPartitionException(); this.o5.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // O6 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o6 = new InvalidPartitionException(); this.o6.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO4()) { oprot.writeFieldBegin(O4_FIELD_DESC); this.o4.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO5()) { oprot.writeFieldBegin(O5_FIELD_DESC); this.o5.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO6()) { oprot.writeFieldBegin(O6_FIELD_DESC); this.o6.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class isPartitionMarkedForEvent_args implements org.apache.thrift.TBase<isPartitionMarkedForEvent_args, isPartitionMarkedForEvent_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PART_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("part_vals", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)4); private 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>(); for (Map.Entry<String, String> other_element : other.part_vals.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__part_vals_copy_key = other_element_key; String __this__part_vals_copy_value = other_element_value; __this__part_vals.put(__this__part_vals_copy_key, __this__part_vals_copy_value); } this.part_vals = __this__part_vals; } if (other.isSetEventType()) { this.eventType = other.eventType; } } public isPartitionMarkedForEvent_args deepCopy() { return new isPartitionMarkedForEvent_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; this.part_vals = null; this.eventType = null; } public String getDb_name() { return this.db_name; } public void setDb_name(String db_name) { this.db_name = db_name; } public void unsetDb_name() { this.db_name = null; } /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } public void setDb_nameIsSet(boolean value) { if (!value) { this.db_name = null; } } public String getTbl_name() { return this.tbl_name; } public void setTbl_name(String tbl_name) { this.tbl_name = tbl_name; } public void unsetTbl_name() { this.tbl_name = null; } /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } public void setTbl_nameIsSet(boolean value) { if (!value) { this.tbl_name = null; } } public int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } public void putToPart_vals(String key, String val) { if (this.part_vals == null) { this.part_vals = new HashMap<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() { return 0; } public int compareTo(isPartitionMarkedForEvent_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; isPartitionMarkedForEvent_args typedOther = (isPartitionMarkedForEvent_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } if (isSetPart_vals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEventType()).compareTo(typedOther.isSetEventType()); if (lastComparison != 0) { return lastComparison; } if (isSetEventType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, typedOther.eventType); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map237 = iprot.readMapBegin(); this.part_vals = new HashMap<String,String>(2*_map237.size); for (int _i238 = 0; _i238 < _map237.size; ++_i238) { String _key239; // required String _val240; // required _key239 = iprot.readString(); _val240 = iprot.readString(); this.part_vals.put(_key239, _val240); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // EVENT_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.eventType = PartitionEventType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.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, this.part_vals.size())); for (Map.Entry<String, String> _iter241 : this.part_vals.entrySet()) { oprot.writeString(_iter241.getKey()); oprot.writeString(_iter241.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (this.eventType != null) { oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); oprot.writeI32(this.eventType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase<isPartitionMarkedForEvent_result, isPartitionMarkedForEvent_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField O5_FIELD_DESC = new org.apache.thrift.protocol.TField("o5", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final org.apache.thrift.protocol.TField O6_FIELD_DESC = new org.apache.thrift.protocol.TField("o6", org.apache.thrift.protocol.TType.STRUCT, (short)6); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public NoSuchObjectException getO2() { return this.o2; } public void setO2(NoSuchObjectException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public UnknownDBException getO3() { return this.o3; } public void setO3(UnknownDBException o3) { this.o3 = o3; } public void unsetO3() { this.o3 = null; } /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } public void setO3IsSet(boolean value) { if (!value) { this.o3 = null; } } public UnknownTableException getO4() { return this.o4; } public void setO4(UnknownTableException o4) { this.o4 = o4; } public void unsetO4() { this.o4 = null; } /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } public void setO4IsSet(boolean value) { if (!value) { this.o4 = null; } } public UnknownPartitionException getO5() { return this.o5; } public void setO5(UnknownPartitionException o5) { this.o5 = o5; } public void unsetO5() { this.o5 = null; } /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ public boolean isSetO5() { return this.o5 != null; } public void setO5IsSet(boolean value) { if (!value) { this.o5 = null; } } public InvalidPartitionException getO6() { return this.o6; } public void setO6(InvalidPartitionException o6) { this.o6 = o6; } public void unsetO6() { this.o6 = null; } /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ public boolean isSetO6() { return this.o6 != null; } public void setO6IsSet(boolean value) { if (!value) { this.o6 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((NoSuchObjectException)value); } break; case O3: if (value == null) { unsetO3(); } else { setO3((UnknownDBException)value); } break; case O4: if (value == null) { unsetO4(); } else { setO4((UnknownTableException)value); } break; case O5: if (value == null) { unsetO5(); } else { setO5((UnknownPartitionException)value); } break; case O6: if (value == null) { unsetO6(); } else { setO6((InvalidPartitionException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); case O3: return getO3(); case O4: return getO4(); case O5: return getO5(); case O6: return getO6(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); case O4: return isSetO4(); case O5: return isSetO5(); case O6: return isSetO6(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof isPartitionMarkedForEvent_result) return this.equals((isPartitionMarkedForEvent_result)that); return false; } public boolean equals(isPartitionMarkedForEvent_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } boolean this_present_o3 = true && this.isSetO3(); boolean that_present_o3 = true && that.isSetO3(); if (this_present_o3 || that_present_o3) { if (!(this_present_o3 && that_present_o3)) return false; if (!this.o3.equals(that.o3)) return false; } boolean this_present_o4 = true && this.isSetO4(); boolean that_present_o4 = true && that.isSetO4(); if (this_present_o4 || that_present_o4) { if (!(this_present_o4 && that_present_o4)) return false; if (!this.o4.equals(that.o4)) return false; } boolean this_present_o5 = true && this.isSetO5(); boolean that_present_o5 = true && that.isSetO5(); if (this_present_o5 || that_present_o5) { if (!(this_present_o5 && that_present_o5)) return false; if (!this.o5.equals(that.o5)) return false; } boolean this_present_o6 = true && this.isSetO6(); boolean that_present_o6 = true && that.isSetO6(); if (this_present_o6 || that_present_o6) { if (!(this_present_o6 && that_present_o6)) return false; if (!this.o6.equals(that.o6)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(isPartitionMarkedForEvent_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; isPartitionMarkedForEvent_result typedOther = (isPartitionMarkedForEvent_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); if (lastComparison != 0) { return lastComparison; } if (isSetO4()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO5()).compareTo(typedOther.isSetO5()); if (lastComparison != 0) { return lastComparison; } if (isSetO5()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, typedOther.o5); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO6()).compareTo(typedOther.isSetO6()); if (lastComparison != 0) { return lastComparison; } if (isSetO6()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, typedOther.o6); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // O4 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o4 = new UnknownTableException(); this.o4.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // O5 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o5 = new UnknownPartitionException(); this.o5.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // O6 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o6 = new InvalidPartitionException(); this.o6.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO4()) { oprot.writeFieldBegin(O4_FIELD_DESC); this.o4.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO5()) { oprot.writeFieldBegin(O5_FIELD_DESC); this.o5.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO6()) { oprot.writeFieldBegin(O6_FIELD_DESC); this.o6.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_index_args implements org.apache.thrift.TBase<add_index_args, add_index_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_args"); private static final org.apache.thrift.protocol.TField NEW_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_index", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField INDEX_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_table", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(add_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_index_args typedOther = (add_index_args)other; lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_index()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_index, typedOther.new_index); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_table()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_table, typedOther.index_table); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NEW_INDEX if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_index = new Index(); this.new_index.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // INDEX_TABLE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.index_table = new Table(); this.index_table.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.new_index != null) { oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); this.new_index.write(oprot); oprot.writeFieldEnd(); } if (this.index_table != null) { oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); this.index_table.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class add_index_result implements org.apache.thrift.TBase<add_index_result, add_index_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(add_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; add_index_result typedOther = (add_index_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } if (isSetO3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Index(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // O3 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO3()) { oprot.writeFieldBegin(O3_FIELD_DESC); this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_index_args implements org.apache.thrift.TBase<alter_index_args, alter_index_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_args"); private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField BASE_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField IDX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("idx_name", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField NEW_IDX_FIELD_DESC = new org.apache.thrift.protocol.TField("new_idx", org.apache.thrift.protocol.TType.STRUCT, (short)4); private 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() { return 0; } public int compareTo(alter_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_index_args typedOther = (alter_index_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } if (isSetDbname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetBase_tbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIdx_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); if (lastComparison != 0) { return lastComparison; } if (isSetNew_idx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DBNAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbname = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // BASE_TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.base_tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // IDX_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.idx_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // NEW_IDX if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.new_idx = new Index(); this.new_idx.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(this.dbname); oprot.writeFieldEnd(); } if (this.base_tbl_name != null) { oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); oprot.writeString(this.base_tbl_name); oprot.writeFieldEnd(); } if (this.idx_name != null) { oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); oprot.writeString(this.idx_name); oprot.writeFieldEnd(); } if (this.new_idx != null) { oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); this.new_idx.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class alter_index_result implements org.apache.thrift.TBase<alter_index_result, alter_index_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(alter_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; alter_index_result typedOther = (alter_index_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__DELETEDATA_ISSET_ID); } /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ public boolean isSetDeleteData() { return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } public void setDeleteDataIsSet(boolean value) { __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case INDEX_NAME: if (value == null) { unsetIndex_name(); } else { setIndex_name((String)value); } break; case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { setDeleteData((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case INDEX_NAME: return getIndex_name(); case DELETE_DATA: return Boolean.valueOf(isDeleteData()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case INDEX_NAME: return isSetIndex_name(); case DELETE_DATA: return isSetDeleteData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_index_by_name_args) return this.equals((drop_index_by_name_args)that); return false; } public boolean equals(drop_index_by_name_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_index_name = true && this.isSetIndex_name(); boolean that_present_index_name = true && that.isSetIndex_name(); if (this_present_index_name || that_present_index_name) { if (!(this_present_index_name && that_present_index_name)) return false; if (!this.index_name.equals(that.index_name)) return false; } boolean this_present_deleteData = true; boolean that_present_deleteData = true; if (this_present_deleteData || that_present_deleteData) { if (!(this_present_deleteData && that_present_deleteData)) return false; if (this.deleteData != that.deleteData) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_index_by_name_args typedOther = (drop_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } if (isSetDeleteData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // INDEX_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.index_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // DELETE_DATA if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.deleteData = iprot.readBool(); setDeleteDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.index_name != null) { oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); oprot.writeString(this.index_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class 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 { 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 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { return this.o1; } public void setO1(NoSuchObjectException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public MetaException getO2() { return this.o2; } public void setO2(MetaException o2) { this.o2 = o2; } public void unsetO2() { this.o2 = null; } /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } public void setO2IsSet(boolean value) { if (!value) { this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((NoSuchObjectException)value); } break; case O2: if (value == null) { unsetO2(); } else { setO2((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); case O2: return getO2(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_index_by_name_result) return this.equals((drop_index_by_name_result)that); return false; } public boolean equals(drop_index_by_name_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } boolean this_present_o2 = true && this.isSetO2(); boolean that_present_o2 = true && that.isSetO2(); if (this_present_o2 || that_present_o2) { if (!(this_present_o2 && that_present_o2)) return false; if (!this.o2.equals(that.o2)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_index_by_name_result typedOther = (drop_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_index_by_name_args implements org.apache.thrift.TBase<get_index_by_name_args, get_index_by_name_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); private 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() { return 0; } public int compareTo(get_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_by_name_args typedOther = (get_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } if (isSetIndex_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // INDEX_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.index_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } if (this.index_name != null) { oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); oprot.writeString(this.index_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_index_by_name_result implements org.apache.thrift.TBase<get_index_by_name_result, get_index_by_name_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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() { return 0; } public int compareTo(get_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_by_name_result typedOther = (get_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new Index(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_indexes_args implements org.apache.thrift.TBase<get_indexes_args, get_indexes_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_INDEXES: if (value == null) { unsetMax_indexes(); } else { setMax_indexes((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_INDEXES: return Short.valueOf(getMax_indexes()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_INDEXES: return isSetMax_indexes(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_indexes_args) return this.equals((get_indexes_args)that); return false; } public boolean equals(get_indexes_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_indexes = true; boolean that_present_max_indexes = true; if (this_present_max_indexes || that_present_max_indexes) { if (!(this_present_max_indexes && that_present_max_indexes)) return false; if (this.max_indexes != that.max_indexes) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_indexes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_indexes_args typedOther = (get_indexes_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_INDEXES if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_indexes = iprot.readI16(); setMax_indexesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); oprot.writeI16(this.max_indexes); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_indexes_result implements org.apache.thrift.TBase<get_indexes_result, get_indexes_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private 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>(); 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() { return 0; } public int compareTo(get_indexes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_indexes_result typedOther = (get_indexes_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); this.success = new ArrayList<Index>(_list242.size); for (int _i243 = 0; _i243 < _list242.size; ++_i243) { Index _elem244; // required _elem244 = new Index(); _elem244.read(iprot); this.success.add(_elem244); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Index _iter245 : this.success) { _iter245.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_index_names_args implements org.apache.thrift.TBase<get_index_names_args, get_index_names_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); } public void setMax_indexesIsSet(boolean value) { __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); } else { setDb_name((String)value); } break; case TBL_NAME: if (value == null) { unsetTbl_name(); } else { setTbl_name((String)value); } break; case MAX_INDEXES: if (value == null) { unsetMax_indexes(); } else { setMax_indexes((Short)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DB_NAME: return getDb_name(); case TBL_NAME: return getTbl_name(); case MAX_INDEXES: return Short.valueOf(getMax_indexes()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); case MAX_INDEXES: return isSetMax_indexes(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_names_args) return this.equals((get_index_names_args)that); return false; } public boolean equals(get_index_names_args that) { if (that == null) return false; boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { if (!(this_present_db_name && that_present_db_name)) return false; if (!this.db_name.equals(that.db_name)) return false; } boolean this_present_tbl_name = true && this.isSetTbl_name(); boolean that_present_tbl_name = true && that.isSetTbl_name(); if (this_present_tbl_name || that_present_tbl_name) { if (!(this_present_tbl_name && that_present_tbl_name)) return false; if (!this.tbl_name.equals(that.tbl_name)) return false; } boolean this_present_max_indexes = true; boolean that_present_max_indexes = true; if (this_present_max_indexes || that_present_max_indexes) { if (!(this_present_max_indexes && that_present_max_indexes)) return false; if (this.max_indexes != that.max_indexes) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_index_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_names_args typedOther = (get_index_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } if (isSetDb_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } if (isSetTbl_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } if (isSetMax_indexes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.db_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TBL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tbl_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // MAX_INDEXES if (field.type == org.apache.thrift.protocol.TType.I16) { this.max_indexes = iprot.readI16(); setMax_indexesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); oprot.writeI16(this.max_indexes); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_index_names_result implements org.apache.thrift.TBase<get_index_names_result, get_index_names_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } public get_index_names_result deepCopy() { return new get_index_names_result(this); } @Override public void clear() { this.success = null; this.o2 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_index_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_names_result typedOther = (get_index_names_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } if (isSetO2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list246 = iprot.readListBegin(); this.success = new ArrayList<String>(_list246.size); for (int _i247 = 0; _i247 < _list246.size; ++_i247) { String _elem248; // required _elem248 = iprot.readString(); this.success.add(_elem248); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter249 : this.success) { oprot.writeString(_iter249); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_role_args implements org.apache.thrift.TBase<create_role_args, create_role_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_args"); private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(create_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_role_args typedOther = (create_role_args)other; lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole()); if (lastComparison != 0) { return lastComparison; } if (isSetRole()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ROLE if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.role = new Role(); this.role.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.role != null) { oprot.writeFieldBegin(ROLE_FIELD_DESC); this.role.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class create_role_result implements org.apache.thrift.TBase<create_role_result, create_role_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof create_role_result) return this.equals((create_role_result)that); return false; } public boolean equals(create_role_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(create_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; create_role_result typedOther = (create_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_role_args implements org.apache.thrift.TBase<drop_role_args, drop_role_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(drop_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_role_args typedOther = (drop_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ROLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.role_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(this.role_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class drop_role_result implements org.apache.thrift.TBase<drop_role_result, drop_role_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof drop_role_result) return this.equals((drop_role_result)that); return false; } public boolean equals(drop_role_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(drop_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; drop_role_result typedOther = (drop_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_role_names_args implements org.apache.thrift.TBase<get_role_names_args, get_role_names_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(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() { return 0; } public int compareTo(get_role_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_names_args typedOther = (get_role_names_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_role_names_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_role_names_result implements org.apache.thrift.TBase<get_role_names_result, get_role_names_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public get_role_names_result deepCopy() { return new get_role_names_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_role_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_role_names_result typedOther = (get_role_names_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); this.success = new ArrayList<String>(_list250.size); for (int _i251 = 0; _i251 < _list250.size; ++_i251) { String _elem252; // required _elem252 = iprot.readString(); this.success.add(_elem252); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter253 : this.success) { oprot.writeString(_iter253); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class grant_role_args implements org.apache.thrift.TBase<grant_role_args, grant_role_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GRANTOR_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorType", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grant_option", org.apache.thrift.protocol.TType.BOOL, (short)6); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__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 __isset_bit_vector.get(__GRANT_OPTION_ISSET_ID); } public void setGrant_optionIsSet(boolean value) { __isset_bit_vector.set(__GRANT_OPTION_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case ROLE_NAME: if (value == null) { unsetRole_name(); } else { setRole_name((String)value); } break; case PRINCIPAL_NAME: if (value == null) { unsetPrincipal_name(); } else { setPrincipal_name((String)value); } break; case PRINCIPAL_TYPE: if (value == null) { unsetPrincipal_type(); } else { setPrincipal_type((PrincipalType)value); } break; case GRANTOR: if (value == null) { unsetGrantor(); } else { setGrantor((String)value); } break; case GRANTOR_TYPE: if (value == null) { unsetGrantorType(); } else { setGrantorType((PrincipalType)value); } break; case GRANT_OPTION: if (value == null) { unsetGrant_option(); } else { setGrant_option((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ROLE_NAME: return getRole_name(); case PRINCIPAL_NAME: return getPrincipal_name(); case PRINCIPAL_TYPE: return getPrincipal_type(); case GRANTOR: return getGrantor(); case GRANTOR_TYPE: return getGrantorType(); case GRANT_OPTION: return Boolean.valueOf(isGrant_option()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ROLE_NAME: return isSetRole_name(); case PRINCIPAL_NAME: return isSetPrincipal_name(); case PRINCIPAL_TYPE: return isSetPrincipal_type(); case GRANTOR: return isSetGrantor(); case GRANTOR_TYPE: return isSetGrantorType(); case GRANT_OPTION: return isSetGrant_option(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_role_args) return this.equals((grant_role_args)that); return false; } public boolean equals(grant_role_args that) { if (that == null) return false; boolean this_present_role_name = true && this.isSetRole_name(); boolean that_present_role_name = true && that.isSetRole_name(); if (this_present_role_name || that_present_role_name) { if (!(this_present_role_name && that_present_role_name)) return false; if (!this.role_name.equals(that.role_name)) return false; } boolean this_present_principal_name = true && this.isSetPrincipal_name(); boolean that_present_principal_name = true && that.isSetPrincipal_name(); if (this_present_principal_name || that_present_principal_name) { if (!(this_present_principal_name && that_present_principal_name)) return false; if (!this.principal_name.equals(that.principal_name)) return false; } boolean this_present_principal_type = true && this.isSetPrincipal_type(); boolean that_present_principal_type = true && that.isSetPrincipal_type(); if (this_present_principal_type || that_present_principal_type) { if (!(this_present_principal_type && that_present_principal_type)) return false; if (!this.principal_type.equals(that.principal_type)) return false; } boolean this_present_grantor = true && this.isSetGrantor(); boolean that_present_grantor = true && that.isSetGrantor(); if (this_present_grantor || that_present_grantor) { if (!(this_present_grantor && that_present_grantor)) return false; if (!this.grantor.equals(that.grantor)) return false; } boolean this_present_grantorType = true && this.isSetGrantorType(); boolean that_present_grantorType = true && that.isSetGrantorType(); if (this_present_grantorType || that_present_grantorType) { if (!(this_present_grantorType && that_present_grantorType)) return false; if (!this.grantorType.equals(that.grantorType)) return false; } boolean this_present_grant_option = true; boolean that_present_grant_option = true; if (this_present_grant_option || that_present_grant_option) { if (!(this_present_grant_option && that_present_grant_option)) return false; if (this.grant_option != that.grant_option) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(grant_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_role_args typedOther = (grant_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, typedOther.grantor); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(typedOther.isSetGrantorType()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantorType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, typedOther.grantorType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(typedOther.isSetGrant_option()); if (lastComparison != 0) { return lastComparison; } if (isSetGrant_option()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_option, typedOther.grant_option); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ROLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.role_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PRINCIPAL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.principal_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PRINCIPAL_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // GRANTOR if (field.type == org.apache.thrift.protocol.TType.STRING) { this.grantor = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // GRANTOR_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.grantorType = PrincipalType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // GRANT_OPTION if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.grant_option = iprot.readBool(); setGrant_optionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(this.role_name); oprot.writeFieldEnd(); } if (this.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } if (this.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } if (this.grantor != null) { oprot.writeFieldBegin(GRANTOR_FIELD_DESC); oprot.writeString(this.grantor); oprot.writeFieldEnd(); } if (this.grantorType != null) { oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); oprot.writeI32(this.grantorType.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); oprot.writeBool(this.grant_option); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class grant_role_result implements org.apache.thrift.TBase<grant_role_result, grant_role_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_role_result) return this.equals((grant_role_result)that); return false; } public boolean equals(grant_role_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(grant_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_role_result typedOther = (grant_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class revoke_role_args implements org.apache.thrift.TBase<revoke_role_args, revoke_role_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_args"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("role_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)3); private 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() { return 0; } public int compareTo(revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_role_args typedOther = (revoke_role_args)other; lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRole_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ROLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.role_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PRINCIPAL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.principal_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PRINCIPAL_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.role_name != null) { oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); oprot.writeString(this.role_name); oprot.writeFieldEnd(); } if (this.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } if (this.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class revoke_role_result implements org.apache.thrift.TBase<revoke_role_result, revoke_role_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_role_result) return this.equals((revoke_role_result)that); return false; } public boolean equals(revoke_role_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_role_result typedOther = (revoke_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class list_roles_args implements org.apache.thrift.TBase<list_roles_args, list_roles_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_args"); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private 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() { return 0; } public int compareTo(list_roles_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_roles_args typedOther = (list_roles_args)other; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PRINCIPAL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.principal_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PRINCIPAL_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } if (this.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class list_roles_result implements org.apache.thrift.TBase<list_roles_result, list_roles_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); 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() { return 0; } public int compareTo(list_roles_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_roles_result typedOther = (list_roles_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list254 = iprot.readListBegin(); this.success = new ArrayList<Role>(_list254.size); for (int _i255 = 0; _i255 < _list254.size; ++_i255) { Role _elem256; // required _elem256 = new Role(); _elem256.read(iprot); this.success.add(_elem256); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (Role _iter257 : this.success) { _iter257.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_privilege_set_args implements org.apache.thrift.TBase<get_privilege_set_args, get_privilege_set_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_args"); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)3); private 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>(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public get_privilege_set_args deepCopy() { return new get_privilege_set_args(this); } @Override public void clear() { this.hiveObject = null; this.user_name = null; this.group_names = null; } public HiveObjectRef getHiveObject() { return this.hiveObject; } public void setHiveObject(HiveObjectRef hiveObject) { this.hiveObject = hiveObject; } public void unsetHiveObject() { this.hiveObject = null; } /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ public boolean isSetHiveObject() { return this.hiveObject != null; } public void setHiveObjectIsSet(boolean value) { if (!value) { this.hiveObject = null; } } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(get_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_privilege_set_args typedOther = (get_privilege_set_args)other; lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // HIVE_OBJECT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.hiveObject = new HiveObjectRef(); this.hiveObject.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // USER_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); this.group_names = new ArrayList<String>(_list258.size); for (int _i259 = 0; _i259 < _list258.size; ++_i259) { String _elem260; // required _elem260 = iprot.readString(); this.group_names.add(_elem260); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.hiveObject != null) { oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); this.hiveObject.write(oprot); oprot.writeFieldEnd(); } if (this.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(this.user_name); oprot.writeFieldEnd(); } if (this.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); for (String _iter261 : this.group_names) { oprot.writeString(_iter261); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_privilege_set_result implements org.apache.thrift.TBase<get_privilege_set_result, get_privilege_set_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(get_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_privilege_set_result typedOther = (get_privilege_set_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new PrincipalPrivilegeSet(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class list_privileges_args implements org.apache.thrift.TBase<list_privileges_args, list_privileges_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_args"); private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField HIVE_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("hiveObject", org.apache.thrift.protocol.TType.STRUCT, (short)3); private 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() { return 0; } public int compareTo(list_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_privileges_args typedOther = (list_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } if (isSetPrincipal_type()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } if (isSetHiveObject()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PRINCIPAL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.principal_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PRINCIPAL_TYPE if (field.type == org.apache.thrift.protocol.TType.I32) { this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // HIVE_OBJECT if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.hiveObject = new HiveObjectRef(); this.hiveObject.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.principal_name != null) { oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } if (this.principal_type != null) { oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } if (this.hiveObject != null) { oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); this.hiveObject.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class list_privileges_result implements org.apache.thrift.TBase<list_privileges_result, list_privileges_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); 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() { return 0; } public int compareTo(list_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_privileges_result typedOther = (list_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list262 = iprot.readListBegin(); this.success = new ArrayList<HiveObjectPrivilege>(_list262.size); for (int _i263 = 0; _i263 < _list262.size; ++_i263) { HiveObjectPrivilege _elem264; // required _elem264 = new HiveObjectPrivilege(); _elem264.read(iprot); this.success.add(_elem264); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (HiveObjectPrivilege _iter265 : this.success) { _iter265.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class grant_privileges_args implements org.apache.thrift.TBase<grant_privileges_args, grant_privileges_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(grant_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_privileges_args typedOther = (grant_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PRIVILEGES if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.privileges = new PrivilegeBag(); this.privileges.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.privileges != null) { oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); this.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class grant_privileges_result implements org.apache.thrift.TBase<grant_privileges_result, grant_privileges_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof grant_privileges_result) return this.equals((grant_privileges_result)that); return false; } public boolean equals(grant_privileges_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; grant_privileges_result typedOther = (grant_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class revoke_privileges_args implements org.apache.thrift.TBase<revoke_privileges_args, revoke_privileges_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_privileges_args typedOther = (revoke_privileges_args)other; lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivileges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PRIVILEGES if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.privileges = new PrivilegeBag(); this.privileges.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.privileges != null) { oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); this.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class revoke_privileges_result implements org.apache.thrift.TBase<revoke_privileges_result, revoke_privileges_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof revoke_privileges_result) return this.equals((revoke_privileges_result)that); return false; } public boolean equals(revoke_privileges_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; revoke_privileges_result typedOther = (revoke_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class set_ugi_args implements org.apache.thrift.TBase<set_ugi_args, set_ugi_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_args"); private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("user_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_names", org.apache.thrift.protocol.TType.LIST, (short)2); private 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>(); for (String other_element : other.group_names) { __this__group_names.add(other_element); } this.group_names = __this__group_names; } } public set_ugi_args deepCopy() { return new set_ugi_args(this); } @Override public void clear() { this.user_name = null; this.group_names = null; } public String getUser_name() { return this.user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public void unsetUser_name() { this.user_name = null; } /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ public boolean isSetUser_name() { return this.user_name != null; } public void setUser_nameIsSet(boolean value) { if (!value) { this.user_name = null; } } public int getGroup_namesSize() { return (this.group_names == null) ? 0 : this.group_names.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(set_ugi_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_ugi_args typedOther = (set_ugi_args)other; lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } if (isSetUser_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup_names()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // USER_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.user_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(); this.group_names = new ArrayList<String>(_list266.size); for (int _i267 = 0; _i267 < _list266.size; ++_i267) { String _elem268; // required _elem268 = iprot.readString(); this.group_names.add(_elem268); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.user_name != null) { oprot.writeFieldBegin(USER_NAME_FIELD_DESC); oprot.writeString(this.user_name); oprot.writeFieldEnd(); } if (this.group_names != null) { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); for (String _iter269 : this.group_names) { oprot.writeString(_iter269); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class set_ugi_result implements org.apache.thrift.TBase<set_ugi_result, set_ugi_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } public set_ugi_result deepCopy() { return new set_ugi_result(this); } @Override public void clear() { this.success = null; this.o1 = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<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() { return 0; } public int compareTo(set_ugi_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; set_ugi_result typedOther = (set_ugi_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list270 = iprot.readListBegin(); this.success = new ArrayList<String>(_list270.size); for (int _i271 = 0; _i271 < _list270.size; ++_i271) { String _elem272; // required _elem272 = iprot.readString(); this.success.add(_elem272); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); for (String _iter273 : this.success) { oprot.writeString(_iter273); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_delegation_token_args implements org.apache.thrift.TBase<get_delegation_token_args, get_delegation_token_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_owner", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("renewer_kerberos_principal_name", org.apache.thrift.protocol.TType.STRING, (short)2); private 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() { return 0; } public int compareTo(get_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_delegation_token_args typedOther = (get_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_owner()).compareTo(typedOther.isSetToken_owner()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_owner()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_owner, typedOther.token_owner); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRenewer_kerberos_principal_name()).compareTo(typedOther.isSetRenewer_kerberos_principal_name()); if (lastComparison != 0) { return lastComparison; } if (isSetRenewer_kerberos_principal_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer_kerberos_principal_name, typedOther.renewer_kerberos_principal_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TOKEN_OWNER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.token_owner = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.renewer_kerberos_principal_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.token_owner != null) { oprot.writeFieldBegin(TOKEN_OWNER_FIELD_DESC); oprot.writeString(this.token_owner); oprot.writeFieldEnd(); } if (this.renewer_kerberos_principal_name != null) { oprot.writeFieldBegin(RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC); oprot.writeString(this.renewer_kerberos_principal_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class get_delegation_token_result implements org.apache.thrift.TBase<get_delegation_token_result, get_delegation_token_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(get_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_delegation_token_result typedOther = (get_delegation_token_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class renew_delegation_token_args implements org.apache.thrift.TBase<renew_delegation_token_args, renew_delegation_token_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(renew_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; renew_delegation_token_args typedOther = (renew_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(typedOther.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, typedOther.token_str_form); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TOKEN_STR_FORM if (field.type == org.apache.thrift.protocol.TType.STRING) { this.token_str_form = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.token_str_form != null) { oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); oprot.writeString(this.token_str_form); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class renew_delegation_token_result implements org.apache.thrift.TBase<renew_delegation_token_result, renew_delegation_token_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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 BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.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_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { return this.o1; } public void setO1(MetaException o1) { this.o1 = o1; } public void unsetO1() { this.o1 = null; } /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } public void setO1IsSet(boolean value) { if (!value) { this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Long)value); } break; case O1: if (value == null) { unsetO1(); } else { setO1((MetaException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Long.valueOf(getSuccess()); case O1: return getO1(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof renew_delegation_token_result) return this.equals((renew_delegation_token_result)that); return false; } public boolean equals(renew_delegation_token_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { if (!(this_present_o1 && that_present_o1)) return false; if (!this.o1.equals(that.o1)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(renew_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; renew_delegation_token_result typedOther = (renew_delegation_token_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.I64) { this.success = iprot.readI64(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI64(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class cancel_delegation_token_args implements org.apache.thrift.TBase<cancel_delegation_token_args, cancel_delegation_token_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_args"); private static final org.apache.thrift.protocol.TField TOKEN_STR_FORM_FIELD_DESC = new org.apache.thrift.protocol.TField("token_str_form", org.apache.thrift.protocol.TType.STRING, (short)1); private 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() { return 0; } public int compareTo(cancel_delegation_token_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancel_delegation_token_args typedOther = (cancel_delegation_token_args)other; lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(typedOther.isSetToken_str_form()); if (lastComparison != 0) { return lastComparison; } if (isSetToken_str_form()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, typedOther.token_str_form); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TOKEN_STR_FORM if (field.type == org.apache.thrift.protocol.TType.STRING) { this.token_str_form = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.token_str_form != null) { oprot.writeFieldBegin(TOKEN_STR_FORM_FIELD_DESC); oprot.writeString(this.token_str_form); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } public static class cancel_delegation_token_result implements org.apache.thrift.TBase<cancel_delegation_token_result, cancel_delegation_token_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private 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() { return 0; } public int compareTo(cancel_delegation_token_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancel_delegation_token_result typedOther = (cancel_delegation_token_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } if (isSetO1()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @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 } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } } }